'+      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                    ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n opqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                   ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4!5!6!7!8!9!:!;!<!=!>!?!@!A!B!C!D!E!F!G!H!I!J!K!L!M!N!O!P!Q!R!S"T"U"V#W#X#Y#Z#[#\#]#^#_#`#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p$q$r%s%t%u%v%w%x&y&z&{&|&}&~&&&&&&&&''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' ' ''''''''''''''''''' '!'"'#'$'%'&'''(')'*'+','-'.'/'0'1'2'3'4'5'6'7'8'9':';'<'='>'?'@'A'B'C'D'E'F'G'H'I'J'K'L'M'N'O'P'Q'R'S'T'U'V'W'X'Y'Z'['\']'^'_'`'a'b'c'd'e'f'g'h'i'j'k'l'm'n'o'p'q'r's't'u'v'w'x'y'z'{'|'}'~''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''((((((((((((((((((((((((((((((((((((((((((((((((((((((((( ( ( ( ( (((((()**++++++++++ +!+"+#+$+%+&+'+(+)+*++SafeAT First argument is a transformer for pattern strings, e.g. map toLower, but only applying to parts of the pattern not in quotation marks. (Needed to canonicalise HTML where tags are case-insensitive, but attribute values are case sensitive.) +,-./01 23456     +,-./01 23456SafeATSafeAT$ANamespaces are not defined in the XML spec itself, but at http://www.w3.org/TR/xml-names(GA QName is a (possibly) qualified name, in the sense of XML namespaces.wJust Onex Zero Or Oney Zero Or Morez One Or More)bool is whether whitespace is significant\The symbol table stored in a document holds all its general entity reference definitions. !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkmnlopqrstuvwxyz{~|}{|}~vwxyzstuqropklmncdefghij`ab_^Z[\]XYUVWTSQROPLMNKJIFGHDEBC?@A<=>9:;78563412/0-.+,()*$%&'#"! O !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~SafeAT !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+.,-/340A1>?2@56789:;<=BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~tuvwxyz{|}~pqrshijklmnodefg^_`abcXYZ[\]QRSTUVWMNOPIJKLGHCDEF/0123456789:;<=>?@AB+,-.*)($%&'!"# 0 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst uvwxyz{|}~     Safe9AT|Ultimately, an XML parser will find some plain text as the content of a simpleType, which will need to be parsed. We use a TextParser, because values of simpleTypes can also be given elsewhere, e.g. as attribute values in an XSD definition, e.g. to restrict the permissible values of the simpleType. Such restrictions are therefore implemented as layered parsers.|>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~()*>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~W~()*|}z{xyvwturspqnolmjkhifgdebc`a^_\]Z[XYVWTURSPQNOLMJKHIFGDEBC@A>?T>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~7SafeATSource positions contain a filename, line, column, and an inclusion point, which is itself another source position, recursively. ODummy value for generated data, where a true source position does not exist. posInNewCxt name pos creates a new source position from an old one. It is used when opening a new file (e.g. a DTD inclusion), to denote the start of the file nameJ, but retain the stacked information that it was included from the old pos. RJust used to strictify the internal values of a position, to avoid space leaks. 0Add n character positions to the given position. +Add a newline or tab to the given position.+Add a newline or tab to the given position.FAdd the given whitespace char to the given position. Precondition: white c | isSpace c = True                         SafeAMT 'The null Namespace (no prefix, no URI).fEvery Name can be split into a Namespace and local Name. The Namespace might of course be missing.;Return the (possibly absent) Namespace component of a Name.<Return the local component of a Name, without its Namespace.eReturn the printable string for a Name, i.e. attaching a prefix for its namespace (if it has one).M splits a Name of the form "pr:nm" into the prefix "pr" and local name "nm", and looks up the prefix in the given environment to determine its Namespace. There may also be a default namespace (the first argument) for unqualified names. In the absence of a default Namespace, a Name that does not have a prefix remains unqualified. A prefix that is not known in the environment becomes a fresh namespace with null URI. A Name that is already qualified is passed unchanged, unless its URI was null, in which case we check afresh for that prefix in the environment. has the same signature as {, but ignores the arguments for default namespace and environment, and simply removes any pre-existing qualification. converts names to qualified names, except where an existing qualification matches the default namespace, in which case the qualification is removed. (This is useful when translating QNames to Haskell, because Haskell qualified names cannot use the current module name.)OThe initial Namespace environment. It always has bindings for the prefixes xml and xmlns.eAdd a fresh Namespace into the Namespace environment. It is not permitted to rebind the prefixes xml or xmlns", but that is not checked here.)resolveAllNames in a document, causes every name to be properly qualified with its namespace. There is a default namespace for any name that was originally unqualified. This is likely only useful when dealing with parsed document, less useful when generating a document from scratch.     SafeAT4 !" !"! "4 !" SafeAT#A concrete representation of any user-defined Haskell constructor. The constructor has a name, and a sequence of component types. The first sequence of types represents the minimum set of free type variables occurring in the (second) list of real component types. If there are fieldnames, they are contained in the final list, and correspond one-to-one with the component types.%.A concrete representation of any Haskell type.)"separate Haskell name and XML name+A user-defined type has a name, a sequence of type variables, and a set of constructors. (The variables might already be instantiated to actual types.), HTypeableW promises that we can create an explicit representation of of the type of any value..eProject the n'th constructor from an HType and convert it to a string suitable for an XML tagname.//^ converts a concrete representation of the Haskell type of a value (obtained by the method -) into a real DocTypeDecl. It ensures that PERefs are defined before they are used, and that no element or attribute-list is declared more than once.,#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI#$%&*')(+,-./0,-%&'()*+#$0./$#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI SafeAT MA NameConverter is a collection of functions that convert an XName into an HName, for various Haskell namespaces. You can define your own arbitrary resolver, but should ensure that you abide by the Haskell rules for conid, varid, etc.Tfor forward type declsVAn HName is a resolved version of an XName. It should conform to the various namespace rules, and may already include a module qualifier if appropriate.XAn XName just holds the original XSD qualified name. It does not ensure that the string conforms to any rules of the various Haskell namespaces. Use a NameConverter to define how you would like names to be mangled.Z?A simple default set of rules for resolving XNames into HNames.[7Character escapes to create a valid Haskell identifier.\6Ensure that a string does not match a Haskell keyword.]A specialised module-name converter for FpML module names with multiple dashes, including version numbers, e.g. fpml-dividend-swaps-4-7.xsd becomes FpML.V47.Swaps.Dividend but fpml-posttrade-execution-4-7.xsd becomes FpML.V47.PostTrade.Execution^kChop a list into segments, at separators identified by the predicate. The separator items are discarded._>Remove any prefix directory names, and given suffix extension.MNOPQRSTUVWXYZ[\]^_`MNOPQRSTUVWXYZ[\]^_`XYVWMNOPQRSTUZ[\]^_` MNOPQRSTUVWXYZ[\]^_` simons@cryp.to experimentalportableSafeATd&This class promises that the function eT knows how to format this data type into a string without changing the formatting.gfThis is a helper function is required because Haskell does not allow to make an ordinary tuple (like x) an instance of a class. The resulting output will preface the actual attribute with a single blank so that lists of <s can be handled implicitly by the definition for lists of d data types. defghijklmndefg fdenmlkjihg defghijklmnSafeAToRGet the main element of the document so that you can apply CFilters directly. i/ is typically (posInNewCxt "filename" Nothing) pdIf you know that your CFilter returns a tag, you can use this function to get the tagged Element.opqropqropqropqrSafeATs}The List1 type represents lists with at least one element. It is required for DTD content models that use + as a modifier.uYA type corresponding to XML's ANY contentspec. It is either a list of unconverted xml  or some  -able value.Parsing functions (e.g. ) will always produce w. Note: The Show instance for w uses e.xIf an attribute is defaultable, then it either takes the default value (which is omitted from the output), or a non-default value (which obviously must be printed).{The  XmlAttrTypep class promises that an attribute taking an XML enumerated type can be converted to and from a Haskell value.~The  XmlAttributesb class promises that a list of XML tag attributes can be converted to and from a Haskell value.The  XmlContent\ class promises that an XML Content element can be converted to and from a Haskell value.Convert from XML to HaskellConvert from Haskell to XML'Dummy functions (for most types): used only@ in the Char instance for coercing lists of Char into String.We need a parsing monad for reading generic XML Content into specific datatypes. This is a specialisation of the Text.ParserCombinators.Poly ones, where the input token type is fixed as XML Content.'Read a single attribute called "value".Generate a single attribute.<Generate an element with no attributes, named for its HType.7Generate an element with no attributes, named directly.#Turn a simple string into XML text.JTurn a string into an XML CDATA section. (i.e. special characters like &' are preserved without interpretation.)CThe most primitive combinator for XMLParser - get one content item.Get the next content element, checking that it has one of the required tags, using the given matching function. (Skips over comments and whitespace, rejects text and refs. Also returns position of element.)A specialisation of posnElementWith (==).Get the next content element, checking that it has one of the required tags. (Skips over comments and whitespace, rejects text and refs.)ELike element, only permits a more flexible match against the tagname.Run an XMLParser on the contents of the given element (i.e. not on the current monadic content sequence), checking that the contents are exhausted, before returning the calculated value within the current parser context.$A combination of element + interior.(A combination of elementWith + interior.6Do some parsing of the attributes of the given element is a counterpart to T, parsing text content if it exists. Adjacent text and references are coalesced.n'choice f p' means if parseContents succeeds, apply f to the result, otherwise use the continuation parser.not sure this is needed now. 'definite p' previously ensured that an element was definitely present. Now I think the monad might take care of that for us.Estuvwxyz{|}~89:;<=>?@ABCDEFGHIJKLMNOPQRSTnopqrstuvwxyz{|}~LMN#$%&*')(+,-./0stuvwxyz{|}~CLMN~{|}xyzstuvw8stuvwxyz{|}~SafeAT5We need a Parser monad for reading from a sequence of generic XML Contents into specific datatypes that model the structure of XSD descriptions. This is a specialisation of the polyparse combinators, fixing the input token type. Lift boolean  over predicates.0Qualify an ordinary name with the XSD namespace.Predicate for comparing against an XSD-qualified name. (Also accepts unqualified names, but this is probably a bit too lax. Doing it right would require checking to see whether the current schema module's default namespace is XSD or not.)1Get the next content element, checking that it matches some criterion given by the predicate. (Skips over comments and whitespace, rejects text and refs. Also returns position of element.) The list of strings argument is for error reporting - it usually represents a list of expected tags.fGet the next content element, checking that it has the required tag belonging to the XSD namespace.-Get the next content element, whatever it is.8Grab and parse any and all children of the next element.Run an XsdParser on the child contents of the given element (i.e. not in the current monadic content sequence), filtering the children before parsing, and checking that the contents are exhausted, before returning the calculated value within the current parser context.gCheck for the presence (and value) of an attribute in the given element. Absence results in failure.SGrab any attributes that declare a locally-used prefix for a specific namespace.@Predicate for whether an attribute belongs to a given namespace.Tidy up the parsing context.xGiven a URI for a targetNamespace, and a list of Namespaces, tell me the prefix corresponding to the targetNamespace.2An auxiliary you might expect to find in Data.ListTurn a qualified attribute value (two strings) into a qualified name (QName), but excluding the case where the namespace prefix corresponds to the targetNamespace of the current schema document.Parse a Schema declarationParse a (possibly missing)  xsd:annotation element.Parse a definitely-occurring  xsd:annotation element.Parse a FormDefault attribute.!Parse a Final or Block attribute.-Parse a schema item (just under the toplevel  xsd:schema) Parse an  xsd:include. Parse an  xsd:import.Parse a  xsd:redefine.Parse a  xsd:simpleType decl.Parse a  xsd:complexType decl.$Parse the alternative contents of a  xsd:complexType decl.Parse a particle decl./Parse a particle decl with optional attributes. Parse an  xsd:all,  xsd:choice, or  xsd:sequence decl.Parse a  xsd:group decl. Parse an  xsd:element,  xsd:group,  xsd:all,  xsd:choice,  xsd:sequence or  xsd:any. Parse an  xsd:any. Parse an  xsd:anyAttribute. Parse an  xsd:attributegroup. Parse an  xsd:element decl.Parse name and type attributes. Parse an  xsd:attribute decl.;Parse an occurrence range from attributes of given element.Parse a  xsd:unique,  xsd:key, or  xsd:keyref.Parse a  xsd:unique.Parse a  xsd:key.Parse a  xsd:keyref.Parse a  xsd:selector.Parse a  xsd:field.HText parser for a URI (very simple, non-validating, probably incorrect).KText parser for an arbitrary string consisting of possibly multiple tokens.:Parse a textual boolean, i.e. "true", "false", "0", or "1"KParse a "use" attribute value, i.e. "required", "optional", or "prohibited"EParse a "processContents" attribute, i.e. "skip", "lax", or "strict".0Parse an attribute value that should be a QName.6Parse an attribute value that should be a simple Name.9999SafeAMT type definitions in scope)all type definitions, regardless of scopesupertype -> subtypessubstitution groupswhere type is defined*An empty environment of XSD type mappings.CCombine two environments (e.g. read from different interface files)?Build an environment of XSD type mappings from a schema module.$Find all direct module dependencies. SafeATRestrictions on simpleTypeThere are essentially simple types, and complex types, each of which can be either restricted or extended. There are four kinds of complex type: choices, sequences, named groups, or a simple element with content.1The whole Haskell module.8HComments can be attached to most things, but not all of them will exist.92A helper for building the formal Module structure.7      !"#$%&'()*+,-./01234567897     )* !"#$%&'(+,-./0123456789;81234567 !"#$%&'()*+,-./0     9      !"#$%&'()*+,-./0123456789SafeATDZVertically pretty-print a list of things, with open and close brackets, and separators.EZGenerate aligned haddock-style documentation. (but without escapes in comment text yet)Generate aligned haddock-style docs for choices (where each choice has its own documentation, but haddock cannot place it directly next to the appropriate component."Pretty-print a Haskell-style name.Pretty-print an XML-style name.2Some different ways of using a Haskell identifier.2Some different ways of using a Haskell identifier.2Some different ways of using a Haskell identifier.2Some different ways of using a Haskell identifier.2Some different ways of using a Haskell identifier.2Some different ways of using a Haskell identifier.FFConvert a whole document from HaskellTypeModel to Haskell source text./Generate a fragmentary parser for an attribute..Generate a fragmentary toXML for an attribute.-Generate a fragmentary parser for an element.kGenerate a fragmentary toXML for an element. Fragment must still be applied to an actual element value.G?Convert multiple HaskellTypeModel Decls to Haskell source text.H7Convert a single Haskell Decl into Haskell source text.IGenerate an instance of the Extension class for a subtype/supertype pair.}Generate an instance of the Extension class for a type and its "grand"-supertype, that is, the supertype of its supertype.3Generate named fields from elements and attributes.CGenerate a single named field (including type sig) from an element.<Generate a single named field (no type sig) from an element.DWhat is the name of the type for an Element (or choice of Elements)?0Generate a single named field from an attribute.<Generate a list or maybe type name (possibly parenthesised).,Generate a parser for a list or Maybe value.+Generate a toXML for a list or Maybe value.Eliminate a Maybe type modifier, when it occurs directly inside a choice construct (since a parsed Nothing would always be preferred over a real value later in the choice). Likewise, empty lists must be disallowed inside choice.Sometimes, a choice without a type modifier contains element sequences, all of which have the same modifier. In that case, it makes sense to lift the modifier (typically Maybe) to the outer layer.GSplit long lines of comment text into a paragraph with a maximum width.%DEFGHDEFGHEFHGD#DEFGHSafeATIZVertically pretty-print a list of things, with open and close brackets, and separators.JZGenerate aligned haddock-style documentation. (but without escapes in comment text yet)"Pretty-print a Haskell-style name.Pretty-print an XML-style name.2Some different ways of using a Haskell identifier.2Some different ways of using a Haskell identifier.2Some different ways of using a Haskell identifier.2Some different ways of using a Haskell identifier.2Some different ways of using a Haskell identifier.2Some different ways of using a Haskell identifier.KFConvert a whole document from HaskellTypeModel to Haskell source text./Generate a fragmentary parser for an attribute.-Generate a fragmentary parser for an element.L?Convert multiple HaskellTypeModel Decls to Haskell source text.M7Convert a single Haskell Decl into Haskell source text.Instances that depend on FwdDecl'd types, need to be declared in a different module. So they have been separated out from ppHighLevelDecl.IGenerate an instance of the Extension class for a subtype/supertype pair.}Generate an instance of the Extension class for a type and its "grand"-supertype, that is, the supertype of its supertype.3Generate named fields from elements and attributes..Generate a single named field from an element.DWhat is the name of the type for an Element (or choice of Elements)?0Generate a single named field from an attribute.<Generate a list or maybe type name (possibly parenthesised).,Generate a parser for a list or Maybe value.GSplit long lines of comment text into a paragraph with a maximum width. IJKLMIJKLMJKMLIIJKLMSafeAMTNTransform a Schema by lifting all locally-defined anonymous types to the top-level, naming them, and planting a referend at their original location.OGiven an environment of schema type mappings, and a schema module, create a bunch of Decls that describe the types in a more Haskell-friendly way.V:Consolidate a Facet occurrence into a single Occurs value.W6Push another Occurs value inside an existing Modifier.XJConvert an occurs range to a Haskell-style type modifier (Maybe, List, Id)Y7Find the supertype (if it exists) of a given type name.Z{Keep applying the function to transform the value, until it yields Nothing. Returns the sequence of transformed values.NOPQRSTUVWXYZ[ NOPQRSTUVWXYZNOPQRSTUV[WXYZNOPQRSTUVWXYZ[SafeAT%fThe basic token type.g<!--h->i<?j?>k<![l]]>mCDATA INCLUDE IGNORE etcn<!oDOCTYPE ELEMENT ATTLIST etcp</q/>r<s t[u]v=w?x*y+z&{;|#}(~)|%,'' or ""begins with letter, no spacesany character data fake token lexical error`All tokens are paired up with a source position. Lexical errors are passed back as a special TokenT value.The first argument to  is the filename (used for source positions, especially in error messages), and the second is the string content of the XML file. is used when the parser expands a macro (PE reference). The expansion of the macro must be re-lexed as if for the first time.1 is used solely within parsing an entityvalue. Normally, a PERef is logically separated from its surroundings by whitespace. But in an entityvalue, a PERef can be juxtaposed to an identifier, so the expansion forms a new identifier. Thus the need to rescan the whole text for possible PERefs.C\]^_`abcdefghijklmnopqrstuvwxyz{|}~     /\]^_`abcdefghijklmnopqrstuvwxyz{|}~/fghijklmnopqrstuvwxyz{|}~`abcde\]^_\]^_`abcdef ghijklmnopqrstuvwxyz{|}~     NoneAT9XParser is just a specialisation of the PolyState parser.To parse a whole document, xmlParse file content takes a filename (for generating error reports) and the string content of that file. A parse error causes program failure, with message to stderr.To parse just a DTD, dtdParse file contentz takes a filename (for generating error reports) and the string content of that file. If no DTD was found, you get Nothing^ rather than an error. However, if a DTD is found but contains errors, the program crashes.To parse a whole document, xmlParse' file content takes a filename (for generating error reports) and the string content of that file. Any parse error message is passed back to the caller through the Either type.To parse just a DTD, dtdParse' file contentz takes a filename (for generating error reports) and the string content of that file. If no DTD was found, you get  Right Nothing7. If a DTD was found but contains errors, you get a  Left message.MTo parse a partial document, e.g. from an XML-based stream protocol, where you may later want to get more document elements from the same stream. Arguments are: a parser for the item you want, and the already-lexed input to parse from. Returns the item you wanted (or an error message), plus the remainder of the input.2Some empty symbol tables for GE and PE references.HReturn the next token from the input only if it matches the given token.Return a qualified name (although the namespace qualification is not processed here; this is merely to get the correct type).6Return just a name, e.g. element name, attribute name.AReturn an entire XML document including prolog and trailing junk.Return an XML comment.Parse a processing instruction.(Return a DOCTYPE decl, indicating a DTD.4Return a DTD markup decl, e.g. ELEMENT, ATTLIST, etc:Return a complete element including all its inner content.>Parse only the parts between angle brackets in an element tag.GFor use with stream parsers - returns the complete opening element tag.cFor use with stream parsers - accepts a closing tag, provided it matches the given element name.=Return a content particle, e.g. text, element, reference, etcCReturn either a general entity reference, or a character reference.3Return parsed freetext (i.e. until the next markup)] !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW] !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWNoneAT=XParser is just a specialisation of the PolyStateLazy parser.To parse a whole document, xmlParse file content takes a filename (for generating error reports) and the string content of that file. A parse error causes program failure, with message to stderr.To parse just a DTD, dtdParse file contentz takes a filename (for generating error reports) and the string content of that file. If no DTD was found, you get Nothing^ rather than an error. However, if a DTD is found but contains errors, the program crashes.MTo parse a partial document, e.g. from an XML-based stream protocol, where you may later want to get more document elements from the same stream. Arguments are: a parser for the item you want, and the already-lexed input to parse from. Returns the item you wanted (or an error message), plus the remainder of the input.2Some empty symbol tables for GE and PE references.HReturn the next token from the input only if it matches the given token.Return a qualified name (although the namespace qualification is not processed here; this is merely to get the correct type).6Return just a name, e.g. element name, attribute name.AReturn an entire XML document including prolog and trailing junk.Return an XML comment.Parse a processing instruction.(Return a DOCTYPE decl, indicating a DTD.X4Return a DTD markup decl, e.g. ELEMENT, ATTLIST, etc:Return a complete element including all its inner content.>Parse only the parts between angle brackets in an element tag.GFor use with stream parsers - returns the complete opening element tag.cFor use with stream parsers - accepts a closing tag, provided it matches the given element name.=Return a content particle, e.g. text, element, reference, etcCReturn either a general entity reference, or a character reference.3Return parsed freetext (i.e. until the next markup)[YZ[\]^_`abcdefghijklmnopqrsXtuvwxyz{|}~[YZ[\]^_`abcdefghijklmnopqrsXtuvwxyz{|}~NoneAT )A doctype declaration occured(<!DOCTYPE>)'A processing instruction occured (<??>)A comment occured (<!-- -->)An element was opened (<>)An element was closed (</>)(An element without content occured (</>)Some string data occuredA reference occuredsaxParse file contentS takes a filename and the string content of that file and generates a stream of  SaxElementOs. If an error occurs, the parsing stops and a string is returned using the Maybe type. The filenameThe content of the file#A tuple of the parsed elements and Nothing, if no error occured, or Just String if an error occured.   SafeAT11NoneATThe first argument is the name of the file, the second is the string contents of the file. The result is the generic representation of an XML document. Any errors cause program failure with message to stderr...SafeATThe first argument is the name of the file, the second is the string contents of the file. The result is the generic representation of an XML document. Any errors cause program failure with message to stderr.The first argument is the name of the file, the second is the string contents of the file. The result is the generic representation of an XML document. Any parsing errors are returned in the Either type.0                           ! " # $ % & ' ( ) * + , -0                           ! " # $ % & ' ( ) * + , -SafeAT . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A BSafeATString holds default value.Non-empty lists.XML's contentspec allows ANYmixed (#PCDATA | ... )*string only (#PCDATA)Bool for main/aux.9Need to keep both the XML and Haskell versions of a name.original XML namemangled Haskell namePretty print Haskell name.Pretty print XML name.%Pretty print Haskell attributes name./Make a type name valid in both XML and Haskell.8Append an underscore to the Haskell version of the name.NPrefix an attribute enumeration type name with its containing element name.hPrefix an attribute enumeration constructor with its element-tag name, and its enumeration type name.4Prefix a field name with its enclosing element name.'Convert an XML name to a Haskell conid. CFEnsure a generated name does not conflict with a standard haskell one.'Convert an XML name to a Haskell varid. D-Convert colon to prime, hyphen to underscore.( E F G H I C D J  E F G H I C D JSafeAT<Convert typedef to appropriate instance declaration, either  XmlContent,  XmlAttributes, or  XmlAttrType. K L M N O P Q R S T U V W X Y Z K L M N O P Q R S T U V W X Y ZSafeAT [ \ ] ^ _ ` [ \ ] ^ _ ` SafeAT*pA LabelFilter is like a CFilter except that it pairs up a polymorphic value (label) with each of its results.*Conjoin the two branches of a conditional.!All document transformations are content filters!. A filter takes a single XML $ value and returns a sequence of  values, possibly empty.>Throw away current node, keep just the (unprocessed) children. Select the n"'th positional result of a filter. !For a mandatory attribute field,  find key cont- looks up the value of the attribute name key, and applies the continuation cont to the value. +When an attribute field may be absent, use iffind key yes noE to lookup its value. If the attribute is absent, it acts as the no% filter, otherwise it applies the yes filter. ifTxt yes no( processes any textual content with the yes- filter, but otherwise is the same as the no filter.8Select between the two branches of a joined conditional. Sequential (Irish, backwards ) compositionBinary parallel composition. Each filter uses a copy of the input, rather than one filter using the result of the other. (Has a more general type than just CFilter.)oGlue a list of filters together. (A list version of union; also has a more general type than just CFilter.)A special form of filter composition where the second filter works over the same data as the first, but also uses the first's result.)Process children using specified filters.Directional choice: in f |>| g, give g-productions only if no f-productions Pruning: in f  gG, keep only those f-productions which have at least one g-production Pruning: in f  g>, keep only those f-productions which have no g-productions Pronounced slash, f /> g means g inside f Pronounced outside, f </ g means f containing g7Join an element-matching filter with a text-only filter7Express a list of filters like an XPath query, e.g. Apath [children, tag "name1", attr "attr1", children, tag "name2"] is like the XPath query /name1[@attr1]/name2.Interior editing: f  g applies f only when the predicate g1 succeeds, otherwise the content is unchanged. Interior editing: g   f applies f only when the predicate g1 succeeds, otherwise the content is discarded.!Process CHildren In Place. The filter is applied to any children of an element content, and the element rebuilt around the results."Process an element In Place. The filter is applied to the element itself, and then the original element rebuilt around the results.#Recursively process an element in place. That is, the filter is applied to the element itself, then recursively to the results of the filter, all the way to the bottom, then the original element rebuilt around the final results.$GRecursive application of filters: a fold-like operator. Defined as f  chip (foldXml f).%fBuild an element with the given tag name - its content is the results of the given list of filters.&>Build an element with the given name, attributes, and content.'Build some textual content.(Build some CDATA content.)4Rename an element tag (leaving attributes in place).*<Replace the attributes of an element (leaving tag the same).+rAdd the desired attribute name and value to the topmost element, without changing the element in any other way.,ACompose a label-processing filter with a label-generating filter.-ECombine labels. Think of this as a pair-wise zip on labels. e.g.  (numbered - tagged)."Number the results from 1 upwards./In interspersed a f b, label each result of f with the string a?, except for the last one which is labelled with the string b.0fLabel each element in the result with its tag name. Non-element results get an empty string label.1Label each element in the result with the value of the named attribute. Elements without the attribute, and non-element results, get an empty string label.2cLabel each textual part of the result with its text. Element results get an empty string label.3?Label each content with some information extracted from itself.6      !"#$%&'()*+,-./01236      !"#$%&'()*+,-./01236      !"#$%&'()*+,-./01235      !"#$%&'()*+,-./0123 33555566554 4,5!SafeAT456789:;<=>?@ABCDEFGHIJKLMNOPQR456789:;<=>?@ABCDEFGHIJKLMNOPQR456789:;<EFGHIJ=>?@APQBCDKLMNOR456789:;<=>?@ABCDEFGHIJKLMNOPQR"NoneATSThis useful auxiliary checks the commandline arguments for two filenames, the input and output file respectively. If either is missing, it is replaced by  aC, which can be interpreted by the caller as stdin and/or stdout.T The wrapper processXmlWith returns an IO () computation that collects the filenames (or stdin/stdout) to use when reading/writing XML documents. Its CFilter argument is applied to transform the XML document from the input and write it to the output. No DTD is attached to the output.If the input filename ends with .html or .htm, it is parsed using the error-correcting HTML parser rather than the strict XML parser.U The wrapper  onContentn simply applies a given content filter to a document. Ambiguous or empty results raise an error exception.STUSTUSTUSTU#SafeATV<double content filter - takes document root + local subtree.W3lift an ordinary content filter to a double filter.X3lift an ordinary content filter to a double filter.Yddrop a double filter to an ordinary content filter. (permitting interior access to document root)Zdrop a double filter to an ordinary content filter. (Where interior access to the document root is not needed, the retaining pointer to the outer element can be pruned away. Z is more space-efficient than Y in this situation.)[1lift a CFilter combinator to a DFilter combinator\1lift a CFilter combinator to a DFilter combinator]'lifted composition over double filters.^lifted choice._ lifted union.`lifted predicates.alifted predicates.blifted unit and zero.clifted unit and zero.VWXYZ[\]^_`abcdefghijklmnoVWXYZ[\]^_`abcdefghijklmnoVWXYZ[\]^_`abcdefghijklmnoVWXYZ[\]^_`abcdefghijklmno$SafeATpTo convert an Xtract query into an ordinary HaXml combinator expression. First arg is a tag-transformation function (e.g. map toLower) appliedqSThe cool thing is that the Xtract command parser directly builds a higher-order V (see !Text.XML.HaXml.Xtract.CombinatorsF) which can be applied to an XML document without further ado. ( parseXtract. halts the program if a parse error is found.) b parseXtract'0 returns error messages through the Either type. c dpq b e f g h i j k l m n o p q r s t u v w x y z { |pqqp c dpq b e f g h i j k l m n o p q r s t u v w x y z { |%SafeAT@ } ~  rs t u v w rstuvwrvutsw@ } ~  rs t u v w  6 6 5&NoneAT xRRead an XML document from a file and convert it to a fully-typed Haskell value.yJWrite a fully-typed Haskell value to the given file as an XML document.zWrite any Haskell value to the given file as an XML document, using the FastPackedString interface (output will not be prettified).{.Read a fully-typed XML document from a string.|=Convert a fully-typed XML document to a string (without DTD).}AConvert a fully-typed XML document to a ByteString (without DTD).~EConvert a fully-typed XML document to a string (with or without DTD).~Read a Haskell value from an XML document, ignoring the DTD and using the Haskell result type to determine how to parse it.3Read a fully-typed XML document from a file handle.2Write a fully-typed XML document to a file handle.{Write a fully-typed XML document to a file handle, using the FastPackedString interface (output will not be prettified).xyz{|}~89:;<=>?@ABCDEFGHIJKLMNOPQRSTnopqrstuvwxyz{|}~LMN#$%&*')(+,-./0stuvwxyz{|}~xyz{|}~ ~{|}xyzxyz{|}~'NoneATgUEquivalent to the Either type, but using the regular naming scheme of this module.jgSomewhat of a nonsense - a choice of a single item. But sometimes it occurs in auto-generated code."      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"jklghimcdefn^_`aboXYZ[\]pQRSTUVWqIJKLMNOPr@ABCDEFGHs6789:;<=>?t+,-./012345u !"#$%&'()*vw     xyz{|}~P         !"#$%&'()*+ ,-./0123456 789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(None9<=?AT The  xsd:any' type. Parsing will always produce an UnconvertedANY.A trick to enable forward-declaration of a type that will be defined properly in another module, higher in the dependency graph. fd# is a dummy type e.g. the empty  data FwdA, where a is the proper data A, not yet available.A type t can restrict another type s, that is, t admits fewer values than s, but all the values t does admit also belong to the type s.~A type t can extend another type s by the addition of extra elements and/or attributes. s is therefore the supertype of t.A SchemaType promises to interconvert between a generic XML content tree and a Haskell value, according to the rules of XSD.Given a TextParser for a SimpleType, make it into an XMLParser, i.e. consuming textual XML content as input rather than a String.|Between is a list parser that tries to ensure that any range specification (min and max elements) is obeyed when parsing.Generated parsers will use O as a convenient wrapper to lift a SchemaAttribute parser into an XMLParser.'Parse the textual part of mixed contentFor a ComplexType that is an extension of a SimpleType, it is necessary to convert the value to XML first, then add in the extra attributes that constitute the extension.C     v89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~GH      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~%GH=     )NoneAT=Convert a fully-typed XML document to a string (without DTD). EConvert a fully-typed XML document to a string (with or without DTD).A  A  *NoneATk takes a DTD and a tagged element, and returns a list of errors in the document with respect to its DTD.If you have several documents to validate against a single DTD, then you will gain efficiency by freezing-in the DTD through partial application, e.g. checkMyDTD = validate myDTD.q is like validate, except that it does not check that the element type matches that of the DTD's root element.               +NoneAT RRead an XML document from a file and convert it to a fully-typed Haskell value.JWrite a fully-typed Haskell value to the given file as an XML document.Write any Haskell value to the given file as an XML document, using the FastPackedString interface (output will not be prettified)..Read a fully-typed XML document from a string.=Convert a fully-typed XML document to a string (without DTD).AConvert a fully-typed XML document to a ByteString (without DTD).EConvert a fully-typed XML document to a string (with or without DTD).~Read a Haskell value from an XML document, ignoring the DTD and using the Haskell result type to determine how to parse it.3Read a fully-typed XML document from a file handle.2Write a fully-typed XML document to a file handle. {Write a fully-typed XML document to a file handle, using the FastPackedString interface (output will not be prettified). !"#$%&'()*89:;<=>?@ABCDEFGHIJKLMNOPQRSTnopqrstuvwxyz{|}~LMN#$%&*')(+,-./0stuvwxyz{|}~   !"#$%&'()*NoneAT !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkmnlopqrstuvwxyz{~|} defg      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST ,-.,-/,-0123456789:;<=>?@ABCDEFGHIIJJKLMNNOOPQRSTTUVWXYZZ[\]^__``aabcdefghijklmmnnopqrstuvwxxyyz{|{z}}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCD/.EFGHIJKLMNOPWQRSTUUVVWXYYZ[\\]^_`abbcdefgghijklmnoppqrstuvwxyz{|}~8      !"#$%&'()*+,-./0123456789:;<=>?@ABBCCDDEFGHIISSJJ@@KLMMLLKKJJIIHHGGFFEEDD^^PPOONNMMCNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~>CD                         B                                                             ! " # $ % & ' ()*+,-.//0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstFuvwxyz{|}~ @S? :      !"#@$%&B'()*+E,-./0123456 789:;<=,-.123456 79:;<=>?@ABCDEFGyHHIJKLMNOPQ1-RBSTUVWSSXYZ[\]^_`abcdefgh i j k l m n o p q r s t u v w x y z { | } ~                  B              !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"""########{##|###m#n#o#q#r##x#y#}#####$$%%%%%%&&&&&&&&&&&&&&''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' ' '''''''''''''''''''' '!'"'"'#'$'%'&'''(')'*'+','-'.'/'0'1'2'2'3'4'5'6'7'8'9':';'<'='>'?'@'A'A'B'C'D'E'F'G'H'I'J'K'L'M'N'O'O'P'Q'R'S'T'U'V'W'X'Y'Z'['\'\']'^'_'`'a'b'c'd'e'f'g'h'h'i'j'k'l'm'n'o'p'q'r's's't'u'v'w'x'y'z'{'|'}'}'~''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' ' (((((((((((((((((((( (!("(#($(%(&('((()(*(+(,(-(.(/(0(1(2(3(4(5(6(7(8(9(:(;(<(=(>(?(@(A(B(C(D(E(F(G(H(I(J(K(L(M(N(O)P*Q*R++++++++++++S++T+++U+V+W+X+YZ[\]^_`ab4cd4ce4cf4cg4ch4ci4jk4jl4jm4jn4jo4jp4jq4jr4jr4js4tu4tu4tv4wx4cy4cz4c{4c|4c}4c~4c4c4c?           y             <                   = 8       4[\     [\     Z[\ !"#$%&'()*+,-\./012yN3456789 !"#$%&'()*+,-\.8/012yN3456789:;<=>?@AB<= CDEFG6 '()*+,78/HIJK9y<=CDLEFG6 '()*+,78/HIJK9y<=JMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}4~$$,$$$$$$$$$$$$$$$$$$$$$$$$$%%%%%%%%%%M%%%%%%%%%%%%y%%%%%%%%%%%%%<%%%%%%%%%%%%%%%%%%%=%8% %%)))~)))))))M)))))))))))))))))y)))))))))))))))<)))))))))))))))))))=)8) )****L****P*Q*R******* #HaXml-1.25.4-LjZxkeqjpeoL53QWlbgfaK$Text.XML.HaXml.Schema.PrimitiveTypes Text.XML.HaXml.XmlContent.ParserText.XML.HaXmlText.XML.HaXml.Xtract.LexText.XML.HaXml.VersionText.XML.HaXml.Types"Text.XML.HaXml.Schema.XSDTypeModelText.XML.HaXml.PosnText.XML.HaXml.NamespacesText.XML.HaXml.PrettyText.XML.HaXml.TypeMapping$Text.XML.HaXml.Schema.NameConversionText.XML.HaXml.VerbatimText.XML.HaXml.UtilText.XML.HaXml.Schema.Parse!Text.XML.HaXml.Schema.Environment&Text.XML.HaXml.Schema.HaskellTypeModel#Text.XML.HaXml.Schema.PrettyHaskell"Text.XML.HaXml.Schema.PrettyHsBoot$Text.XML.HaXml.Schema.TypeConversionText.XML.HaXml.LexText.XML.HaXml.ParseText.XML.HaXml.ParseLazyText.XML.HaXml.SAXText.XML.HaXml.Html.PrettyText.XML.HaXml.Html.ParseLazyText.XML.HaXml.Html.ParseText.XML.HaXml.Escape#Text.XML.HaXml.DtdToHaskell.TypeDef$Text.XML.HaXml.DtdToHaskell.Instance#Text.XML.HaXml.DtdToHaskell.ConvertText.XML.HaXml.CombinatorsText.XML.HaXml.Html.GenerateText.XML.HaXml.Wrappers!Text.XML.HaXml.Xtract.CombinatorsText.XML.HaXml.Xtract.ParseText.XML.HaXml.ByteStringPPText.XML.HaXml.XmlContentText.XML.HaXml.OneOfNText.XML.HaXml.Schema.SchemaText.XML.HaXml.ShowXmlLazyText.XML.HaXml.Validate!Text.XML.HaXml.XmlContent.Haskellghc-prim GHC.TypesDoubleFloatInt integer-gmpGHC.Integer.TypeIntegerbase Data.Maybe catMaybespretty-1.1.3.3Text.PrettyPrint.HughesPJrenderTokenTSymbol TokStringTokNumPosnPnToken lexXtract $fShowTokenT $fShowPosn$fEqPosn $fEqTokenTversionCDSectCharData SystemLiteral PubidLiteralEVEVStringEVRef EntityValueAttValueNmTokensNmTokenNamesName NamespacensPrefixnsURIQNameNQN EncodingDeclPublicIDPUBLICID NotationDeclNOTATIONExtPE ExtParsedEntTextDecl NDataDeclNDATA ExternalIDSYSTEMPUBLICPEDefPEDefEntityValuePEDefExternalID EntityDefDefEntityValue DefExternalIDPEDeclGEDecl EntityDecl EntityGEDecl EntityPEDecl PEReferenceCharRef EntityRef Reference RefEntityRefCharIgnoreSectContentsIgnore IgnoreSect IncludeSectConditionalSectFIXED DefaultDeclREQUIREDIMPLIED DefaultTo Enumeration NotationTypeEnumeratedType TokenizedTypeIDIDREFIDREFSENTITYENTITIESNMTOKENNMTOKENSAttType StringTypeAttDef AttListDeclMixedPCDATA PCDATAplusModifierNoneQueryStarPlusCPTagNameChoiceSeq ContentSpecEMPTYANY ElementDeclContentCElemCStringCRefCMisc AttributeElemTagElementElem ExtSubsetDecl ExtMarkupDeclExtConditionalSect ExtSubset MarkupDeclAttListEntityNotation MarkupMisc DocTypeDeclDTDPITargetComment VersionInfoSDDeclProcessingInstructionMiscPIXMLDeclPrologDocumentSymTabemptySTaddSTlookupSTinfo $fEqElemTag$fShowAttValue $fOrdQName $fEqNamespace$fFunctorContent$fFunctorElement$fFunctorDocument $fEqContent$fEqMisc $fShowMisc $fEqModifier$fShowModifier$fEqTokenizedType$fShowTokenizedType $fEqFIXED $fShowFIXED $fEqIgnore $fShowIgnore$fEqIgnoreSectContents$fShowIgnoreSectContents$fEqEncodingDecl$fShowEncodingDecl $fEqTextDecl$fShowTextDecl $fEqXMLDecl $fShowXMLDecl$fShowNamespace $fEqQName $fShowQName $fEqMixed $fShowMixed$fEqCP$fShowCP$fEqContentSpec$fShowContentSpec$fEqElementDecl$fShowElementDecl $fEqNDataDecl$fShowNDataDecl $fEqReference$fShowReference$fEqEnumeratedType$fShowEnumeratedType $fEqAttType $fShowAttType $fEqAttValue$fEqDefaultDecl$fShowDefaultDecl $fEqAttDef $fShowAttDef$fEqAttListDecl$fShowAttListDecl$fEqEV$fShowEV$fEqEntityValue$fShowEntityValue$fEqPubidLiteral$fShowPubidLiteral $fEqPublicID$fShowPublicID$fEqSystemLiteral$fShowSystemLiteral$fEqExternalID$fShowExternalID$fEqNotationDecl$fShowNotationDecl $fEqPEDef $fShowPEDef $fEqPEDecl $fShowPEDecl $fEqEntityDef$fShowEntityDef $fEqGEDecl $fShowGEDecl$fEqEntityDecl$fShowEntityDecl$fEqMarkupDecl$fShowMarkupDecl$fEqExtSubsetDecl$fShowExtSubsetDecl$fEqConditionalSect$fShowConditionalSect $fEqExtPE $fShowExtPE $fEqExtSubset$fShowExtSubset$fEqDocTypeDecl$fShowDocTypeDecl $fEqProlog $fShowProlog $fShowContent $fEqElement $fShowElement$fEqExtParsedEnt$fShowExtParsedEnt $fEqDocument$fShowDocumentTypeNameURIRegexp FixedValue DefaultValueSchemaLocationProcessContentsSkipLaxStrictBlockFinal NoExtension NoRestrictionAllFinalTargetNamespaceQForm Qualified Unqualified Annotation DocumentationAppInfo NoAnnotationFixedNillable MyRestrictionRangePattern PrimitiveTypeStringBooleanDecimalDurationDateTimeTimeDate GYearMonthGYear GMonthDayGDayGMonth Base64Binary HexBinaryAnyURIUseRequiredOptional ProhibitedOccursFieldfield_annotation field_xpathSelectorselector_annotationselector_xpathKeyRefkeyref_annotation keyref_name keyref_referkeyref_selector keyref_fieldsKeykey_annotationkey_name key_selector key_fieldsUniqueunique_annotation unique_nameunique_selector unique_fieldsUniqueKeyOrKeyRefUKKR AttributeDeclattr_annotationattr_nameOrRefattr_use attr_defFixed attr_formattr_simpleType NameAndTypeNTtheNametheTypeelem_annotationelem_nameOrRef elem_occurs elem_nillableelem_substGroup elem_abstract elem_final elem_block elem_form elem_content elem_stuff AttrGroupattrgroup_annotationattrgroup_nameOrRefattrgroup_stuffAnyAttranyattr_annotationanyattr_namespaceanyattr_processContentsAnyany_annotation any_namespaceany_processContents any_occurs ElementEtc HasElementHasGroupHasCSHasAny ChoiceOrSeqAllSequenceGroupgroup_annotationgroup_nameOrRef group_occurs group_stuff ParticleAttrsPAParticle Extensionextension_annotationextension_baseextension_newstuff Restriction1 ComplexItem SimpleContentComplexContentThisType ci_annotationci_stuffci_mixed ci_thistype ComplexTypecomplex_annotation complex_namecomplex_abstract complex_final complex_block complex_mixedcomplex_content FacetTypeOrderedBoundsMinInclOrderedBoundsMinExclOrderedBoundsMaxInclOrderedBoundsMaxExclOrderedNumericTotalDigitsOrderedNumericFractionDigitsUnorderedPatternUnorderedEnumerationUnorderedWhitespaceUnorderedLengthUnorderedMaxLengthUnorderedMinLengthFacetfacet_facetTypefacet_annotationfacet_facetValue facet_fixed Restriction RestrictSim1 RestrictTyperestrict_annotation restrict_base restrict_r1 restrict_typerestrict_facets SimpleType Primitive RestrictedListOfUnionOfsimple_primitivesimple_annotation simple_name simple_finalsimple_restriction simple_type simple_unionsimple_members SchemaItemIncludeImportRedefineSimpleComplex SchemaElementSchemaAttributeAttributeGroup SchemaGroupSchemaschema_elementFormDefaultschema_attributeFormDefaultschema_finalDefaultschema_blockDefaultschema_targetNamespaceschema_versionschema_namespaces schema_items$fMonoidSchema$fMonoidAnnotation $fEqFacetType$fShowFacetType$fEqNameAndType$fShowNameAndType $fEqOccurs $fShowOccurs$fEqUse $fShowUse$fEqPrimitiveType$fShowPrimitiveType$fEqAnnotation$fShowAnnotation $fEqField $fShowField $fEqSelector$fShowSelector $fEqKeyRef $fShowKeyRef$fEqKey $fShowKey $fEqUnique $fShowUnique$fEqUniqueKeyOrKeyRef$fShowUniqueKeyOrKeyRef $fEqFacet $fShowFacet $fEqQForm $fShowQForm $fEqFinal $fShowFinal$fEqProcessContents$fShowProcessContents$fEqMyRestriction$fShowMyRestriction $fEqAnyAttr $fShowAnyAttr$fEqAny $fShowAny$fEqElementEtc$fShowElementEtc$fEqComplexType$fShowComplexType$fEqComplexItem$fShowComplexItem$fEqParticleAttrs$fShowParticleAttrs$fEqAttributeDecl$fShowAttributeDecl$fEqSimpleType$fShowSimpleType$fEqRestriction$fShowRestriction$fEqRestriction1$fShowRestriction1$fEqChoiceOrSeq$fShowChoiceOrSeq $fEqGroup $fShowGroup $fEqAttrGroup$fShowAttrGroup $fEqExtension$fShowExtension$fEqSchemaItem$fShowSchemaItem $fEqSchema $fShowSchemaPositiveIntegerPositive UnsignedByteUByte UnsignedShortUShort UnsignedIntUInt UnsignedLongULongNonNegativeIntegerNonNegByteShortLongNegativeIntegerNegativeNonPositiveIntegerNonPosNCNameLanguageNormalizedString Normalized XsdStringacceptingParsersimpleTypeText$fSimpleTypePositiveInteger$fSimpleTypeUnsignedByte$fSimpleTypeUnsignedShort$fSimpleTypeUnsignedInt$fSimpleTypeUnsignedLong$fSimpleTypeNonNegativeInteger$fSimpleTypeByte$fSimpleTypeShort$fSimpleTypeInt$fSimpleTypeLong$fSimpleTypeNegativeInteger$fSimpleTypeNonPositiveInteger$fSimpleTypeInteger$fSimpleTypeNMTOKENS$fSimpleTypeNMTOKEN$fSimpleTypeENTITIES$fSimpleTypeENTITY$fSimpleTypeIDREFS$fSimpleTypeIDREF$fSimpleTypeID$fSimpleTypeNCName$fSimpleTypeName$fSimpleTypeLanguage$fSimpleTypeToken$fSimpleTypeNormalizedString$fSimpleTypeGMonth$fSimpleTypeGDay$fSimpleTypeGMonthDay$fSimpleTypeGYear$fSimpleTypeGYearMonth$fSimpleTypeDate$fSimpleTypeTime$fSimpleTypeDateTime$fSimpleTypeDuration$fSimpleTypeDouble$fSimpleTypeFloat$fSimpleTypeDecimal$fSimpleTypeNOTATION$fSimpleTypeAnyURI$fSimpleTypeHexBinary$fSimpleTypeBase64Binary$fSimpleTypeXsdString$fSimpleTypeBool $fEqXsdString$fShowXsdString$fEqBase64Binary$fShowBase64Binary $fEqHexBinary$fShowHexBinary $fEqAnyURI $fShowAnyURI $fEqNOTATION$fShowNOTATION $fEqDecimal $fShowDecimal $fEqDuration$fShowDuration $fEqDateTime$fShowDateTime$fEqTime $fShowTime$fEqDate $fShowDate$fEqGYearMonth$fShowGYearMonth $fEqGYear $fShowGYear $fEqGMonthDay$fShowGMonthDay$fEqGDay $fShowGDay $fEqGMonth $fShowGMonth$fEqNormalizedString$fShowNormalizedString $fEqToken $fShowToken $fEqLanguage$fShowLanguage$fEqName $fShowName $fEqNCName $fShowNCName$fEqID$fShowID $fEqIDREF $fShowIDREF $fEqIDREFS $fShowIDREFS $fEqENTITY $fShowENTITY $fEqENTITIES$fShowENTITIES $fEqNMTOKEN $fShowNMTOKEN $fEqNMTOKENS$fShowNMTOKENS$fEqNonPositiveInteger$fShowNonPositiveInteger$fEqNegativeInteger$fShowNegativeInteger$fEqLong $fShowLong $fEqShort $fShowShort$fEqByte $fShowByte$fEqNonNegativeInteger$fShowNonNegativeInteger$fEqUnsignedLong$fShowUnsignedLong$fEqUnsignedInt$fShowUnsignedInt$fEqUnsignedShort$fShowUnsignedShort$fEqUnsignedByte$fShowUnsignedByte$fEqPositiveInteger$fShowPositiveInteger posnFilenameposnLine posnColumnnoPos posInNewCxtforcepaddcolnewlinetabwhite nullNamespace expandedName namespaceName localName printableNamequalify deQualifyqualifyExceptLocalinitNamespaceEnvaugmentNamespaceEnvresolveAllNamesdocumentprolog doctypedeclelementcontentcpConstrHTypeMaybeListTuplePrimDefined HTypeabletoHType showConstrtoDTD showHType $fHTypeable[]$fHTypeableEither$fHTypeableMaybe$fHTypeable(,,,,,,,,,,,,,,)$fHTypeable(,,,,,,,,,,,,,)$fHTypeable(,,,,,,,,,,,,)$fHTypeable(,,,,,,,,,,,)$fHTypeable(,,,,,,,,,,)$fHTypeable(,,,,,,,,,)$fHTypeable(,,,,,,,,)$fHTypeable(,,,,,,,)$fHTypeable(,,,,,,)$fHTypeable(,,,,,)$fHTypeable(,,,,)$fHTypeable(,,,)$fHTypeable(,,)$fHTypeable(,) $fHTypeable()$fHTypeableChar$fHTypeableDouble$fHTypeableFloat$fHTypeableInteger$fHTypeableInt$fHTypeableBool $fEqHType $fEqConstr $fShowConstr $fShowHType NameConvertermodidconidvaridunqconidunqvaridfwdconidfieldidHNameXNamesimpleNameConverterescape avoidKeywordsfpmlwordsBybasenamefpmlNameConverter $fEqXName $fShowXName $fShowHNameVerbatimverbatimqnameverbAttr$fVerbatimAttValue$fVerbatimReference$fVerbatimElement$fVerbatimContent$fVerbatimEither$fVerbatimChar $fVerbatim[] docContent contentElemattrstagTextContentList1NonEmpty ANYContent UnConverted DefaultableDefault NonDefault XmlAttrType fromAttrToTyp toAttrFrTyp XmlAttributes fromAttrstoAttrs XmlContent parseContents toContentsxToChar xFromChar XMLParserattvalmkAttrmkElemmkElemCtoTexttoCDataposnElementWith posnElement elementWithinterior inElement inElementWith attributestextchoicedefinite maybeToAttr defaultToAttr definiteAdefaultA possibleA fromAttrToStr toAttrFrStrstr2attrattr2str$fXmlContentANYContent$fHTypeableANYContent$fXmlContentList1$fHTypeableList1$fEqANYContent$fShowANYContent$fXmlContent(,,,,,,,,,,,,,,)$fXmlContent(,,,,,,,,,,,,,)$fXmlContent(,,,,,,,,,,,,)$fXmlContent(,,,,,,,,,,,)$fXmlContent(,,,,,,,,,,)$fXmlContent(,,,,,,,,,)$fXmlContent(,,,,,,,,)$fXmlContent(,,,,,,,)$fXmlContent(,,,,,,)$fXmlContent(,,,,,)$fXmlContent(,,,,)$fXmlContent(,,,)$fXmlContent(,,)$fXmlContent(,)$fEqDefaultable$fShowDefaultable $fEqList1 $fShowList1 XsdParser|||xsdxsdTag xsdElement anyElement allChildren interiorWith attributenamespaceAttrsmatchNamespacetidy targetPrefixlookupByqualschema annotationdefiniteAnnotationqformfinalblock schemaItemincludeimport_redefine simpleTypeaFacetfacet complexType complexItemparticle particleAttrs choiceOrSeqgroup_ elementEtcany_anyAttrattributeGroup elementDecl nameAndType attributeDecloccursuniqueKeyOrKeyRefuniquekeykeyRefselectorfield_uristringspacebooluseprocessContentsname Environmentenv_type env_allTypes env_element env_attribute env_group env_attrgroup env_namespace env_extendty env_substGrp env_typelocemptyEnv combineEnv mkEnvironment gatherImportsRestrictRangeR StrLengthSingle attr_name attr_type attr_required attr_commentOneOfAnyElemText elem_name elem_type elem_modifier elem_byRef elem_locals elem_substs elem_comment elem_oneOfDeclNamedSimpleTypeRestrictSimpleTypeExtendSimpleTypeUnionSimpleTypesEnumSimpleType ElementsAttrsElementsAttrsAbstract ElementOfTypeElementAbstractOfTypeRestrictComplexTypeExtendComplexTypeExtendComplexTypeAbstract XSDInclude XSDImport XSDCommentModule module_name module_xsd_nsmodule_re_exportsmodule_import_only module_declsmkModule $fEqAttribute$fShowAttribute $fEqRestrict$fShowRestrict$fEqDecl $fShowDeclppvList ppCommentppModuleppHighLevelDeclsppHighLevelDecltypeLiftconvertcommentxname checkXName nameOfSimple mkRestrict singleton consolidatecombineOccursModifieroccursToModifier supertypeOf repeatedly$fMonoidOccursSectionCDATAxINCLUDExIGNORExSpecialDOCTYPExELEMENTxATTLISTxENTITYx NOTATIONxTokCommentOpenTokCommentClose TokPIOpen TokPICloseTokSectionOpenTokSectionClose TokSectionTokSpecialOpen TokSpecial TokEndOpen TokEndClose TokAnyOpen TokAnyClose TokSqOpen TokSqCloseTokEqualTokQueryTokStarTokPlusTokAmpTokSemiTokHash TokBraOpen TokBraCloseTokPipe TokPercentTokCommaTokQuoteTokName TokFreeTextTokNullTokErrorxmlLexxmlReLexreLexEntityValue $fEqWhere $fEqSpecial $fShowSpecial $fEqSection $fShowSectionXParserxmlParsedtdParse xmlParse' dtdParse' xmlParseWithemptySTsfst3snd3thd3tokprocessinginstructioncdsectelemtag elemOpenTag elemCloseTag referencechardata SaxElementSaxDocTypeDeclSaxProcessingInstruction SaxCommentSaxElementOpenSaxElementClose SaxElementTag SaxCharData SaxReferencesaxParse htmlParse htmlParse' XmlEscaper xmlEscapexmlEscapeContent xmlUnEscapexmlUnEscapeContent stdXmlEscaper mkXmlEscaper StructType StringMixed AttrFields ConstructorsTypeDefDataDefEnumDefxNamehName ppTypeDefppHNameppXNameppANamename_name_aname_acname_fmanglemanglef$fShowStructType$fEqStructType $fEqTypeDef mkInstance dtd2TypeDef LabelFilterThenElse:>CFilterkeepnonechildrenpositionelmtxttagtagWithattrattrvalfindiffindifTxt?>ounioncatandThen childrenBy|>|withwithout/>*><*Control.Applicativeoptional WrappedMonad WrapMonad unwrapMonad WrappedArrow WrapArrow unwrapArrowZipList getZipListData.Functor.ConstConstgetConst Data.Functor<$>liftA3liftA2liftA<**> Alternativeempty<|>somemany%polyparse-1.12-1nXKJVwHCorGLJOG6UjPVx Text.Parse allAsString parseLitChar parseLitChar' parseFloatparseHexparseOctparseDecparseInt parseSigned enumeration constructorsfieldoptionalParensisWordwordreadsPrecByParsePrec readByParse parseByRead TextParserParseparse parsePrec parseList!Text.ParserCombinators.Poly.Plain runParser"Text.ParserCombinators.Poly.Parserreparse satisfyMsgsatisfyeofnextonFailParserP Text.ParserCombinators.Poly.Base manyFinally' manyFinallybracket bracketSepsepBy1sepBymany1uptoexactlyindentoneOf adjustErrBadfailBaddiscardapply Commitmentcommit adjustErroneOf' PolyParse"Text.ParserCombinators.Poly.ResultResultSuccessFailure Committedeithermaybexmldeclmiscsddecl markupdeclisText carryelem carrycontent spancontent elementdecl contentspecmodifiermixed attlistdeclattdefatttype tokenizedtypeenumeratedtype notationtype defaultdecl entityrefcharref entitydeclgedeclpedecl entitydefpedef externalid ndatadecl notationdeclpublicid encodingdeclnmtokenattvalue entityvalueev pubidliteral systemliteralcontainsDoubleQuote flatConstr outerHtExpr innerHtExpr constrHtExprdebug searchMaybe Data.FoldableorppCommentForChoiceppModIdppConIdppVarId ppUnqConId ppUnqVarId ppFwdConIdppAttr toXmlAttrppElem toXmlElem ppExtensionppSuperExtensionppFieldsppFieldElement ppFieldNameppElemTypeNameppFieldAttributeppTypeModifierppElemModifierxmlElemModifier cleanChoicesliftedElemModifier paragraphCommentPositionBeforeAfter ppJoinConId ppFieldId uniqueifyppHighLevelInstancesppElementAbstractOfTypeWhereInTagNotInTagskipprefixes textUntiltextOrRefUntilxmlPIxmlPIEnd xmlCommentxmlAnyxmlTag xmlSection xmlSpecialxmlName xmlContentSymTabstoEOFaddPEaddGElookupPE flattenEVnottokfreetextposnfailPfailBadPreport adjustErrPpeRefjustDTD versioninfo extsubset extsubsetdecl checkmatchsequence debugShowCPdebugShowModifierconditionalsect newIgnore pereferencetextdecl parseStreamsaxsaxelementopensaxelementclose saxcomment saxchardata saxreferencesaxdoctypedeclsaxprocessinginstructionStackHParserselfclosingtagscloseInnerTagscloses closeInnerunparse reformatAttrs reformatTagssimplifytoEscape fromEscapeisEscape FiniteMaplistToFMlookupFM escapeElementescapeAttributesescapeAttValue escapeContentmkEscapeunEscapeElementunEscapeAttributesunEscapeAttValueunEscapeContent unEscapeCharcompressElementcompressAttributescompressAttValuecompressContent notPrelude decolonifyppSTppCppFppACderives commaListSameNameSameExtendedmkInstanceAttrsattrpats mkParseConstrmkParseContentsmkToElemmkCpat nameSupply mkTranslatemkToAttrmkFrFldmkToFldmkToAuxmkToMultRecordRmkData mkAttrDef mkAttrFieldGHC.Num- parseXtract'unescapenumbersymbolquotepamaquerytqueryxtagxquery tpredicate upredicate vpredicate tattribute uattribute vattribute wattributeiindex simpleindexrrange numberdollaridxcommaopnop<><+>$$hcathsepvcatsepfsepnest carryscantoWord8 toXmlLazyDoc SimpleDTDelementsrequiredidsidrefs simplifyDTDgivescpErrordisplay duplicates