ma=      !"#$%&'()*+,-./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 NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      = The basic token type.  fake token any character data begins with letter, no spaces '' or "" , % | ) ( # ; !& "+ #* $? %= &] '[ (  )< */> +</ ,DOCTYPE ELEMENT ATTLIST etc -<! .CDATA INCLUDE IGNORE etc /]]> 0<![ 1?> 2<? 3-> 4<!-- 5:Source positions contain a filename, line, column, and an = inclusion point, which is itself another source position,  recursively. 671All tokens are paired up with a source position. . Lexical errors are passed back through the Either type. 8posInNewCxt name pos0 creates a new source position from an old one. H It is used when opening a new file (e.g. a DTD inclusion), to denote  the start of the file name*, but retain the stacked information that  it was included from the old pos. 9The first argument to 9- is the filename (used for source positions, J especially in error messages), and the second is the string content of  the XML file. ::9 is used when the parser expands a macro (PE reference). J The expansion of the macro must be re-lexed as if for the first time. 0  !"#$%&'()*+,-./0123456789:09:875643210/.-,+*)('&%$#"!   0  43210/.-,+*)('&%$#"!  !"#$%&'()*+,-./01234566789:#;<=>XML's contentspec allows ANY ?@ANon-empty lists. BCString holds default value. DEFGHI Bool for main/aux. J:Need to keep both the XML and Haskell versions of a name. KLoriginal XML name Mmangled Haskell name NOPretty print Haskell name. PPretty print XML name. Q&Pretty print Haskell attributes name. R+Make a name valid in both XML and Haskell. S9Append an underscore to the Haskell version of the name. TFPrefix an attribute enumeration type name with its containing element  name. UGPrefix an attribute enumeration constructor with its element-tag name, " and its enumeration type name. V5Prefix a field name with its enclosing element name. W(Convert an XML name to a Haskell conid. X(Convert an XML name to a Haskell varid. .Convert colon to prime, hyphen to underscore. ;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXGIHFE;DCBA@?>=<NOPQJKLMRSTUVWX; DCBA@?>=<<=>?@ABCDEFGIHHIJKLMKLMNOPQRSTUVWXY<Convert typedef to appropriate instance declaration, either  XmlContent,   XmlAttributes, or  XmlAttrType. YYYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ One Or More  Zero Or More  Zero Or One  Just One *bool is whether whitespace is significant intermediate for parsing CThe symbol table stored in a document holds all its general entity  reference definitions. Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ef|~}y{zwxuvstqropmnklcd`ba^_\]jihg[ZZ[\]]^__`baabcddeffghijkllmnnoppqrrsttuvvwxxy{zz{|~}}~ 3FA 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 no 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. 9Select between the two branches of a joined conditional.  Sequential (Irish, backwards) composition DBinary parallel composition. Each filter uses a copy of the input, 7 rather than one filter using the result of the other. 0 (Has a more general type than just CFilter.) <Glue a list of filters together. (A list version of union; 4 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.  not exported Directional choice:  in f |>| g- give g-productions only if no f-productions  Pruning: in f  g, F 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 g  8Join an element-matching filter with a text-only filter  4Express a list of filters like an XPath query, e.g.  path [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 g succeeds, ' otherwise the content is unchanged. Interior editing:  g  f applies f only when the predicate g succeeds, ' otherwise the content is discarded. BProcess CHildren In Place. The filter is applied to any children F of an element content, and the element rebuilt around the results. ARecursive 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. Rename an element tag. &Replace the attributes of an element. BCompose a label-processing filter with a label-generating filter. =Combine labels. Think of this as a pair-wise zip on labels. #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. ALabel each element in the result with its tag name. Non-element & results get an empty string label. HLabel each element in the result with the value of the named attribute. C Elements without the attribute, and non-element results, get an  empty string label. >Label each textual part of the result with its text. Element & results get an empty string label.  @Label each content with some information extracted from itself. 2      2      2      !"#$%&!"#$%&!%$#"&!"#$%& '()*+,-./0123456789:;<=>?@ABCDE'()*+,-./0123456789:;<=>?@ABCDE'()*+,-./89:;<=01234CD567>?@ABE'()*+,-./0123456789:;<=>?@ABCDE portable experimentalsimons@cryp.toF&This class promises that the function G knows how to : format this data type into a string without changing the  formatting. GH?This is a helper function is required because Haskell does not ' allow to make an ordinary tuple (like ) an instance of a D 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 F data types. FGHFGHFGGH IJKLMIJKLMJKILMIJKLMNNNN OPQROPQROPQROPQRS=double content filter - takes document root + local subtree. TU4lift an ordinary content filter to a double filter. V3drop a double filter to an ordinary content filter WX2lift a CFilter combinator to a DFilter combinator Y(lifted composition over double filters. Zlifted choice. [\lifted predicates. ]^lifted unit and zero. _`abcdefghSTUVWXYZ[\]^_`abcdefghSUTVXWYZ\[^]`a_bcdefghSTUVWXYZ[\]^_`abcdefghij:The parser type is parametrised on the types of the state s,  the input tokens t , error-type e, and the result value a. A The state and remaining input are threaded through the monad.  k#Deliver the first remaining token. l$Fail if end of input is not reached  CDeliver the first parse result only, eliminating any backtracking. mCApply the parser to some real input, given an initial state value.  If the parser fails, raise   to halt the program. E (This is the original exported behaviour - to allow the caller to ( deal with the error differently, see papply'.) nCApply the parser to some real input, given an initial state value. C If the parser fails, return a diagnostic message to the caller. o8A choice between parsers. Keep only the first success.  5Deliver the first token if it satisfies a predicate. p3Deliver the first token if it equals the argument. q;Deliver the first token if it does not equal the argument. rDeliver zero or more values of a. sDeliver one or more values of a. tDeliver zero or more values of a separated by b's. uDeliver one or more values of a separated by b's. vwxyz{|>Accept a complete parse of the input only, no partial parses.  GReturn an error using the supplied diagnostic string, and a token type ( which includes position information. }0If the parser fails, generate an error message. ~Update the internal state. Query the internal state. #Deliver the entire internal state. ;This is useful for recursively expanding macros. When the ? user-parser recognises a macro use, it can lookup the macro > expansion from the parse state, lex it, and then stuff the . lexed expansion back down into the parser. ijklmnopqrstuvwxyz{|}~ijklmnopqrstuvwxyz{|}~ijjklmnopqrstuvwxyz{|}~QTo parse a whole document, xmlParse file content takes a filename G (for generating error reports) and the string content of that file. A A parse error causes program failure, with message to stderr. To parse just a DTD, dtdParse file content takes a filename A (for generating error reports) and the string content of that ' file. If no DTD was found, you get Nothing rather than an error. H However, if a DTD is found but contains errors, the program crashes. To parse a whole document, xmlParse' file content takes a filename G (for generating error reports) and the string content of that file. D Any parse error message is passed back to the caller through the  Either type. To parse just a DTD, dtdParse' file content takes a filename A (for generating error reports) and the string content of that ' file. If no DTD was found, you get  Right Nothing. 5 If a DTD was found but contains errors, you get a  Left message.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ!HA class to convert any Haskell value to and from an XML representation. ;Determine the type of the Haskell value (to create a DTD). 2Convert the Haskell value to a generic XML value. CParse a Haskell value from a generic XML representation, returning + the value and the remainder of the XML. 4This function is a dummy for most types: it is used only in = the Char instance for coercing lists of Char into String. 4This function is a dummy for most types: it is used only in = the Char instance for coercing lists of Char into String. CA concrete representation of any user-defined Haskell constructor. G The constructor has a name, and a sequence of component types. The C first sequence of types represents the minimum set of free type E variables occurring in the (second) list of real component types. /A concrete representation of any Haskell type. >A user-defined type has a name, a sequence of type variables,  and a set of constructors. #separate Haskell name and Xml name [\]^; converts a concrete representation of the Haskell type of # a value (obtained by the method ) into a real DocTypeDecl. H It ensures that PERefs are defined before they are used, and that no 9 element or attribute-list is declared more than once. _`abcEConvert any Haskell value to an XML document, including both DTD and  content. @Read a Haskell value from an XML document, ignoring the DTD and ? using the Haskell result type to determine how to parse it. CConvert an XML document encoded as a String, into a Haskell value. AConvert a Haskell value to an XML document, encoded as a String. <Read a Haskell value from an XML document stored in a file. <Write a Haskell value to the given file as an XML document. BRead a Haskell value from an XML document transmitted through the  given d. #Write a Haskell value to the given d as an XML document. Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}~%;The List1 type represents lists with at least one element. C It is required for DTD content models that use + as a modifier. A type corresponding to XML's ANY contentspec :data ANYContent = forall a . XmlContent a => ANYContent a AIf an attribute is defaultable, then it either takes the default D value (which is omitted from the output), or a non-default value & (which obviously must be printed). JThe XmlAttrType class promises that an attribute taking an XML enumerated 6 type can be converted to and from a Haskell value. CThe XmlAttributes class promises that a list of XML tag attributes 1 can be converted to and from a Haskell value. AThe XmlContent class promises that an XML content element can be * converted to and from a Haskell value. ARead an XML document from a file and convert it to a fully-typed  Haskell value. >Write a fully-typed Haskell value to the given file as an XML  document. /Read a fully-typed XML document from a string. 0Convert a fully-typed XML document to a string. 4Read a fully-typed XML document from a file handle. 3Write a fully-typed XML document to a file handle. e,,$fghijklmnopq9 takes a DTD and a tagged element, and returns a list of 3 errors in the document with respect to its DTD. @If you have several documents to validate against a single DTD, H then you will gain efficiency by freezing-in the DTD through partial  application, e.g. checkMyDTD = validate myDTD. 6 is like validate, except that it does not check that + the element type matches that of the DTD's root element. rstu      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~w~}|{zyxlvutsrqponm`kjihgfedcbaS_^]\[ZYXWVUTERQPONMLKJIHGF6DCBA@?>=<;:987&543210/.-,+*)('%$#"!                %$#"!  !"#$%&543210/.-,+*)(''()*+,-./0123456DCBA@?>=<;:987789:;<=>?@ABCDE RQPONMLKJIHGFFGHIJKLMNOPQRS _^]\[ZYXWVUTTUVWXYZ[\]^_` kjihgfedcbaabcdefghijkl vutsrqponmmnopqrstuvw ~}|{zyxxyz{|}~)vwxEThe first argument is the name of the file, the second is the string F contents of the file. The result is the generic representation of  an XML document. yz{|}~?This useful auxiliary checks the commandline arguments for two A filenames, the input and output file respectively. If either ! is missing, it is replaced by ", which can be interpreted by the  caller as stdin and/ or stdout.  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. BIf the input filename ends with .html or .htm, it is parsed using G the error-correcting HTML parser rather than the strict XML parser. &The version of the library (currently 1.13.2). Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      $'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMETo mix an Xtract query into an ordinary HaXml combinator expression. AThe cool thing is that the Xtract command parser directly builds  a higher-order S (see !Text.Xml.HaXml.Xtract.Combinators) @ which can be applied to an XML document without further ado.  !"#$%&'()*+,-./01 23456789:;<=>?@ABCDEFGHIJKLMNOP$%&QRSTUVWXYZ[\]^_`abccdefghijklmnopqrsttuuvwxyyzz{|}c~~                                      ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~UVY[] Z\g      !"#$%&'()*+,-."/0123456789:/;<=>?@ABCDE;FGHIJKLMNOFPQRSTUVWXPYZ[\]^_`Yabcdefgahijklmhnopqrnstuvswxywz{z|}~         G A                    jG     : !"#$%&j'G   ()*+p,-./0123456789:;<=> HaXml-1.13.3Text.XML.HaXml.Haskell2XmlText.XML.HaXml.Xml2HaskellText.XML.HaXmlText.XML.HaXml.Xtract.LexText.XML.HaXml.Lex#Text.XML.HaXml.DtdToHaskell.TypeDef$Text.XML.HaXml.DtdToHaskell.InstanceText.XML.HaXml.TypesText.XML.HaXml.CombinatorsText.XML.HaXml.PrettyText.XML.HaXml.Html.GenerateText.XML.HaXml.VerbatimText.XML.HaXml.Escape#Text.XML.HaXml.DtdToHaskell.ConvertText.XML.HaXml.Html.Pretty!Text.XML.HaXml.Xtract.Combinators*Text.ParserCombinators.HuttonMeijerWallaceText.XML.HaXml.ParseText.XML.HaXml.ValidateText.XML.HaXml.OneOfNText.XML.HaXml.Html.ParseText.XML.HaXml.WrappersText.XML.HaXml.Xtract.Parsebase Data.List isPrefixOf Data.Maybe catMaybespretty-1.0.1.2Text.PrettyPrint.HughesPJrenderTokenTTokNum TokStringSymbolPosnPnToken lexXtractSectionIGNORExINCLUDExCDATAxSpecial NOTATIONxENTITYxATTLISTxELEMENTxDOCTYPExTokNull TokFreeTextTokNameTokQuoteTokComma TokPercentTokPipe TokBraClose TokBraOpenTokHashTokSemiTokAmpTokPlusTokStarTokQueryTokEqual TokSqClose TokSqOpen TokAnyClose TokAnyOpen TokEndClose TokEndOpen TokSpecialTokSpecialOpen TokSectionTokSectionCloseTokSectionOpen TokPIClose TokPIOpenTokCommentCloseTokCommentOpen posInNewCxtxmlLexxmlReLex StructTypeDefinedStringAnyOneOfTupleList1List DefaultableMaybe AttrFields ConstructorsTypeDefEnumDefDataDefNamexNamehName ppTypeDefppHNameppXNameppANamenamename_name_aname_acname_fmanglemanglef mkInstanceCDSectCharData SystemLiteral PubidLiteralEVEVRefEVString EntityValueAttValueNmTokensNmTokenNames EncodingDeclPublicIDPUBLICID NotationDeclNOTATIONExtPE ExtParsedEntTextDecl NDataDeclNDATA ExternalIDPUBLICSYSTEMPEDefPEDefExternalIDPEDefEntityValue EntityDef DefExternalIDDefEntityValuePEDeclGEDecl EntityDecl EntityPEDecl EntityGEDecl PEReferenceCharRef EntityRef ReferenceRefChar RefEntityIgnoreSectContentsIgnore IgnoreSect IncludeSectConditionalSectFIXED DefaultDecl DefaultToIMPLIEDREQUIRED Enumeration NotationTypeEnumeratedType TokenizedTypeNMTOKENSNMTOKENENTITIESENTITYIDREFSIDREFIDAttType StringTypeAttDef AttListDeclMixed PCDATAplusPCDATAModifierPlusStarQueryNoneCPSeqChoiceTagName ContentSpecANYEMPTY ElementDeclContentCMiscCRefCStringCElem AttributeElemTagElementElem ExtSubsetDeclExtConditionalSect ExtMarkupDecl ExtSubset MarkupDecl MarkupMiscNotationEntityAttList DocTypeDeclDTDPITargetComment VersionInfoSDDeclProcessingInstructionMiscPIXMLDeclPrologDocumentSymTabemptySTaddSTlookupST LabelFilterThenElse:>CFilterkeepnonechildrenpositionelmtxttagtagWithattrattrvalfindiffindifTxt?>ounioncatandThen|>|withwithout/>||owitho owithoutookeepoononeo ochildrenooelmootxto applypredoiffindooifTxtoocato//>><