ݔu      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst #Data type for regular expressions. 2Constructs a regular expression for an empty set. % 1.parameter errMsg : error message / returns : regular expression for an empty set 7Constructs a regular expression for an empty sequence. 4 returns : regular expression for an empty sequence 7Constructs a regular expression for accepting a symbol . 1.parameter sym : the symbol to be accepted 5 returns : regular expression for accepting a symbol @Constructs a regular expression for accepting any singel symbol > returns : regular expression for accepting any singel symbol >Constructs an optional repetition (*) of a regular expression 6 1.parameter re_a : regular expression to be repeted " returns : new regular expression uremove redundant nested *'s in RE % theoretically this is unneccessary, G but without this simplification the runtime can increase exponentally L when computing deltas, e.g. for a** or (a|b*)* which is the same as (a|b)* 4Constructs a repetition (+) of a regular expression 6 1.parameter re_a : regular expression to be repeted " returns : new regular expression 1Constructs an option (?) of a regular expression 7 1.parameter re_a : regular expression to be optional " returns : new regular expression 5Constructs a sequence (,) of two regular expressions : 1.parameter re_a : first regular expression in sequence ; 2.parameter re_b : second regular expression in sequence " returns : new regular expression 9Constructs an alternative (|) of two regular expressions = 1.parameter re_a : first regular expression of alternative > 2.parameter re_b : second regular expression of alternative " returns : new regular expression ;Checks if a regular expression matches the empty sequence. nullable e == [] `in` L(e) HThis check indicates if a regular expression fits to a sentence or not. 4 1.parameter re : regular expression to be checked B returns : true if regular expression matches the empty sequence,  otherwise false v9Derives a regular expression with respect to one symbol. L(delta e x) = x  L(e) 4 1.parameter re : regular expression to be derived J 2.parameter sym : the symbol on which the regular expression is applied * returns : the derived regular expression 9Derives a regular expression with respect to a sentence. & 1.parameter re : regular expression F 2.parameter s : sentence to which the regular expression is applied * returns : the derived regular expression HChecks if an input matched a regular expression. The function should be  called after matches. Was the sentence used in matches, in the language of the regular expression?  -> matches e s == s `in` L(e)? 2 1.parameter re : the derived regular expression K returns : empty String if input matched the regular expression, otherwise , an error message is returned <Constructs a string representation of a regular expression. ( 1.parameter re : a regular expression ? returns : the string representation of the regular expression    portablestableUwe Schmidt (uwe@fh-wedel.de)-Create a tree with a tag node. & 1.parameter n : the name of the tag ) 2.parameter al : the tag attribte list ( 3.parameter cs : the list of children  returns : the new tree .Version with qualified name of - //create a tree with a namespace aware tag node. 2 1.parameter n : the prefix:localpart of the tag $ 2.parameter ns: the namespace uri ) 3.parameter al : the tag attribte list ( 4.parameter cs : the list of children  returns : the new tree  see also: - 01creates a new document tree with empty contents. 7 1.parameter al : the attribute list for the root node )returns a single node tree with tag name "/" indicating a root and  with empty list of children  see also : 1 1the empty document tree  see also : 0 2:create a new empty document with source name as parameter 3Vcreate a new empty document with a list of attributes for source location and options  see also : 2 4create a document root tree. N 1.parameter al : the attribute list for the root. This list must contain at  least an attribute "source"7 that contains the URI of the document to be processed 5 2.parameter cs : the list for the document content  returns : the document root 5"create a leaf for a text element.  1.parameter txt : the text = returns : the tree with the single node containing the text 6$create a leaf for a char reference. < 1.parameter i : the integer representing the Unicode char G returns : the tree with the single node containing the char reference 7'create a leaf for an entity reference. 3 1.parameter n : the name of the entity reference I returns : the tree with the single node containing the entity reference 8create a leaf for a comment, # 1.parameter c : the comment text @ returns : the tree with the single node containing the comment 9"create a tree for a part of a DTD + 1.parameter d : the type of the DTD part 7 2.parameter al : the attribute list for the DTD part J 3.parameter ds : the possibly empty list of components for the DTD part / returns : the tree with the composed DTD part :Fcreate an attribute tree as part of a tag attribute list of tag nodes % 1.parameter al : the attribute name Z 2.parameter av : the attribute value as tree list, usually containing a single text node ;Qualified version of : <*create an attribute tree with a namespace % 1.parameter al : the attribute name  2.parameter ns : namespace uri Z 3.parameter av : the attribute value as tree list, usually containing a single text node  see also: :, / =.create a parameter entity reference DTD part. . 1.parameter ref : the name of the reference $ returns : the DTD part for a PERef >&create a processing instruction tree. % 1.parameter n : the name of the PI ( 2.parameter str : the content of a PI C returns : the processing instruction tree with a single attribute "value" 6 with the str parameter as attribute value, with valueOf a_value applied to the result tree , the content of the PI can be selected ?create xml declaration @create a CDATA section tree. 3 1.parameter s : the content of the CDATA section * returns : the tree for the CDATA section Acreate an error tree. @ 1.parameter l : the level of the error (warning, error fatal) & 2.parameter msg : the error message = 3.parameter cs : the context, where the error was detected G old name for w (deprecated) H/conversion of a filter result into a text node  see also : w J6select the name of a node. For tags, attributes and pi's the name string % is returned, else the empty string. KPselect the local part of a name of a node. For tags, attributes the name string  is returned, for pi')s the whole name, else the empty string. LZselect the namespace URI of a tag or an attribute tree, else the empty string is returned  see also : J M]select the namespace prefix of a tag or an attribute tree, else the empty string is returned  see also : J, K Nxselect the universal name (namespace uri ++ localPart) of a tag or an attribute tree, else the empty string is returned  see also : J, L O$select the attributes of a dtd tree P)select a special attribute of a DTD part Q test an attribute of a DTD part Gxw !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[E !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[b\?test whether the root of a tree contains a document root node. ]5test whether the root of a tree contains a tag node.  see also: ^ ^rnamespace aware test whether the root of a tree contains a tag node. Parameters are the local part and namespace. * Only usable after namespace propagation.  see also: ] _7test whether the root of a tree has a given local name  see also : a, `, ], r `8test whether the root of a tree has a given prefix name  see also : a, _, ], r a=test whether the root of a tree belongs to a given namespace  see also : ], r, _, ` bItest whether the root of a tree contains a tag node with a special name. catest whether the node of a tree is a XTag node or a XPi node with an attibute of a specific name  see also: r, d datest whether the tree is a XTag node with an attibute of a specific local name and namespace uri  see also: c, s ertest whether the given node is a XTag node or a XPI node with an attribute with a value with a specific property. h In case of a match, the attribute value represented by a text node is returned as single element list, $ else the empty list is the result.  see also :  fEtest whether the tree is a processing instruction with a given name. gtest whether the tree is a < ?xml ... ?> declaration hUtest whether the root of a tree contains a processing instruction of a special name. i7test whether the root of a tree contains a CDATA node. jEtest whether the root of a tree contains a character reference node. k9test whether the root of a tree contains a comment node. l5test whether the root of a tree contains a DTD part. mCtest whether the root of a tree contains an entity reference node. n8test whether the root of a tree contains an error node. oHtest whether the root of a tree contains a processing instruction node. p5test whether the root of a tree contains a tag node. q<test whether the root of a tree contains an attribute node. rPtest whether the root of a tree is an attribute node for a given attribute name snamespace aware test whether the tree contains an attribute node. Parameters are the local part of the atribute name and the namespace. * Only usable after namespace propagation.  see also: ^, r, d t#general test for an attribute name u6test whether the root of a tree contains a text node. v9test whether the root of a tree contains a special text. wMtest whether the root of a tree contains a text node with a special property xKtest whether the root of a tree contains a text node only with whitespace. y=test whether the root of a tree contains a DOCTYPE DTD part. z>test whether the root of a tree contains an ATTLIST DTD part. {>test whether the root of a tree contains an ELEMENT DTD part. |=test whether the root of a tree contains an ENTITY DTD part. }Gtest whether the root of a tree contains a parameter ENTITY reference. ~:test whether the root of a tree contains a DTD name part. Itest whether the root of a tree contains a conditional section DTD part. Itest whether the root of a tree contains a parameter entity declaration. >test whether the root of a tree contains a NOTATION DTD part. Ftest whether the root of a tree contains an error node for a warning. Etest whether the root of a tree contains an error node for an error. Jtest whether the root of a tree contains an error node for a fatal error. #constructor filter for a tag node.  a new tree is constructed. a the attributes and the children are computed by applying the aproprate filter to the input tree  1.parameter n : the tag name 5 2.parameter af : the filter for the attribute list / 3.parameter cf : the filter for the children " returns : the constructor filter  Version with qualified names of  #constructor filter for a tag node.  a new tree is constructed. a the attributes and the children are computed by applying the aproprate filter to the input tree ; 1.parameter n : the tag name in form of prefix:localpart % 2.parameter ns: the namespace uri 5 3.parameter af : the filter for the attribute list / 4.parameter cf : the filter for the children " returns : the constructor filter #filter for attribute construction. A a new tree with attribute name and a value computed by a filter  is build. Qualified version  #filter for attribute construction. O a new tree with attribute name and namespace and a value computed by a filter  is build. $constructor filter for a text node.  a new tree is constructed.  the input tree is ignored. 3constructor filter for a character reference node.  a new tree is constructed.  the input tree is ignored. 1constructor filter for an entity reference node.  a new tree is constructed.  the input tree is ignored. 'constructor filter for a comment node.  a new tree is constructed. 4 the xml string representation of the filter result  forms the comment #constructor filter for a DTD part.  a new tree is constructed.  the input tree is ignored. -constructor filter for a CDATA section node.  a new tree is constructed.  the input tree is ignored. 0constructor filter for a processing instruction 8 a new tree is constructed from the text representation  of the input tree .constructor filter for an error message node.  a new tree is constructed.  the input tree is ignored. Mfilter for selecting the name of a tag node, an attribute node or a pi node. R Result of the filter is a single element list with a text node or the empty list 'filter for selecting the attibute list >filter for selecting the value of an attribute in a tag node. R Result of the filter is a single element list with a text node or the empty list  see also : e,  Mfilter for selecting the value of an attribute with namespace in a tag node. R Result of the filter is a single element list with a text node or the empty list  see also : , s 1filter for selecting an attribute of a DTD node. R Result of the filter is a single element list with a text node or the empty list +filter for selecting content of a comment. R Result of the filter is a single element list with a text node or the empty list (filter for selecting the CDATA content. R Result of the filter is a single element list with a text node or the empty list Gedit filter for changing the name of a tag node, an attribute or a pi. Q result of the filter is a single element list with a tag node or the empty list 2edit filter for changing the text of a text node. R result of the filter is a single element list with a text node or the empty list Cexample for editing all text nodes of a tree with an edit function f: processBottomUp (modifyText f `when` isXText)1edit filter for changing the name of a tag node. R result of the filter is a single element list with a text node or the empty list Bprocess the attribute list of a tag node with a tree list filter. ' for other trees this filter acts like y 3elementwise processing of the attributes of a tag. ' for other trees this filter acts like y  see also :  replace an attribute list / to be renamed when replaceAttrl is eliminated :delete an attribute from the attribute list of a tag tree 1add an attribute to the attribute list of a tag. $ If the attribute already exists, it's substituted,  see also: ,  2adds an attribute list computed by a filter, uses .  see also:  Padd or change an attribute with a given string as value for a XTag or XPi tree,  uses . .add or change an attribute with an Int value.  uses . Bedit filter for changing the value of an attribute in a tag node. T result of the filter is a single element list with the tag node or the empty list. , 1.parameter n : the name of the attribute < 2.parameter f : the edit function for the attribute value  returns : the edit filter )add or change an attribute of a DTD tree 3convenient function for tag node tree construction  infixl 7 ,filter combinator for tag tree constrcution T take a 1. filter for computing a tag node tree (or a whole list of tag node trees) c then add all trees computed by the 2. filter to the attribute list when they represent attributes + else append them to the list of children. cif the 1. filter computes a list of tag nodes, the results of the 2. filter are added to all trees  example:  etag "a" += sattr "href" "#42" += txt " the answer"   gives the tree  <a href="#42"> the answer</a>   example:  ( etag "a" +++ etag "b" ) += sattr "x" "42"   gives the tree  <a x="42"/><b x="42"/>   see also : , , , z,  _convenient filter function adding a whole list of trees, just for not writing to many ( ... ).  infixl 7   f ++= gl == f += cat gl see also :  combination of  and conversion into a String combination of  and conversion to a Int dvariant of mkXTag with a list of filters for the attributes and a list of filters for the children. T this variant leads to a more readable source for a complicated construction filter 0 than the simple solution with a combination of  and {.  see also : , , , {,  Rvariant of tag, useful for tags without attributes and with a list of filters for  constructing the children  see also : , , , {,  Evariant of tag, useful for tags with attributes but without children  see also : , , , , { ,Short cut for empty tags without attributes  see also : , , ,  and  Qualified version of etag Alias for mkQTag {filter for creating a document root node with a list of filters for the attributes and a list of filters for the document.  see also :   Alias for  Alias for mkQAttr ;short cut for attribute construction with string constants  set also : ,  and  short cut for  short cut for simple comment  the input tree is ignored  see also :  >short cut for generating simple processing instructions (spi)  the input tree is ignored spi "xyz" "abc" is equal to mkXPi "xyz" (txt "abc") * (the name pi is already used in prelude) 0short cut for generating simple cdata sections,  the input tree is ignored <DTD part generation with filter for attributes and children  see also: 9 short cut for mkXError c_warn.  see also :   short cut for mkXError c_fatal.  see also :   short cut for mkXError c_fatal.  see also :  check whether an option is set Jreads the value of an attribute, usually applied to a document root node, P and checks if the value represents True. The following strings are interpreted  as true: "1", "True", "true", "yes", "Yes". r\]^_`abcdefghijklmnopqrstuvwxyz{|}~r\]^_`abcdefghijklmnopqrstuvwxyz{|}~|}~{zy      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~xw !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~MType for the namespace association list, used when propagating namespaces by  modifying the  values in a tree %propagate all namespace declarations " xmlns:ns=..." to all ( tag and attribute nodes of a document. :This filter does not check for illegal use of namespaces.  The real work is done by . 4The filter may be applied repeatedly if neccessary. 9attaches the namespace info given by the namespace table 0 to a tag node and its attributes and children. 4validate the namespace constraints in a whole tree. 5 result is the list of errors concerning namespaces.  Work is done by applying  to all nodes.  Predicates , ,   and 5 are applied to the appropriate tags and attributes. (a single node for namespace constrains. remove Comments  remove all Comments recursively 'simple filter for removing whitespace. +no check on sigificant whitespace is done.  see also : ,  5simple recursive filter for removing all whitespace. Bremoves all text nodes in a tree that consist only of whitespace.  see also : ,  Fconverts CDATA sections in whole document tree into normal text nodes ,converts CDATA section in normal text nodes /converts CDATA sections in whole document tree /converts CDATA section in normal text sections -converts character references to normal text =recursively converts all character references to normal text  Applies some  Canonical XML rules to the nodes of a tree. MThe rule differ slightly for canonical XML and XPath in handling of comments KNote: This is not the whole canonicalization as it is specified by the W3C R Recommendation. Adding attribute defaults or sorting attributes in lexicographic  order is done by the  transform function of module !Text.XML.HXT.Validator.Validation. F Replacing entities or line feed normalization is done by the parser. Not implemented yet: 4 Whitespace within start and end tags is normalized c Special characters in attribute values and character content are replaced by character references see  and  *canonicalize tree and remove comments and <?xml ... ?> declarations see  Canonicalize a tree for XPath  Comment nodes are not removed see  =Collects sequences of child XText nodes into one XText node. #Applies collapseXText recursively.  see also :  :filter for indenting a document tree for pretty printing. Dthe tree is traversed for inserting whitespace for tag indentation. >whitespace is only inserted or changed at places, where it isn't significant,  is'Fs not inserted between tags and text containing non whitespace chars. :whitespace is only inserted or changed at places, where it's not significant. < preserving whitespace may be controlled in a document tree  by a tag attribute  xml:space &allowed values for this attribute are default | preserve. #input is a complete document tree. 4 result the semantically equivalent formatted tree.  see also :  4filter for removing all not significant whitespace. 9the tree traversed for removing whitespace between tags, 4 that was inserted for indentation and readability. / whitespace is only removed at places, where it's not significat < preserving whitespace may be controlled in a document tree  by a tag attribute  xml:space &allowed values for this attribute are default | preserve 4input is root node of the document to be cleaned up 4 output the semantically equivalent simplified tree  see also : ,  escape XmlText, / transform all special XML chars into CharRefs 8convert the special XML chars in a text or comment node  into character references  see also  9convert the special XML chars in an attribute value into ; charachter references. Not only the XML specials but also \n, \r and \t are converted  see also: ,  convert the special XML chars ", <, >, & and '# in a document to char references, % attribute values are converted with   see also: ,  =convert a document tree into an output string representation & with respect to the output encoding. 6The children of the document root are stubstituted by A a single text node for the text representation of the document. 3Encoding of the document is performed with respect  to the output-encoding0 attribute in the root node, or if not present,  of the encoding, attribute for the original input encoding. D If the encoding is not specified or not supported, UTF-8 is taken. Pconvert a document into a text and add line numbers to the text representation. 8Result is a root node with a single text node as child. ( Useful for debugging and trace output.  see also : ,  <convert a document into a text representation in tree form. 'Useful for debugging and trace output.  see also : ,  >convert a document into a Haskell representation (with show). 'Useful for debugging and trace output.  see also : ,  ADerives a regular expression with respect to a list of elements. & 1.parameter re : regular expression Q 2.parameter list : list of elements to which the regular expression is applied * returns : the derived regular expression :Derives a regular expression with respect to one element. L(delta e x) = x  L(e) 4 1.parameter re : regular expression to be derived J 2.parameter el : the element on which the regular expression is applied * returns : the derived regular expression     none portable experimentalUwe Schmidt (uwe\@fh-wedel.de)?call an external program with a list of command line arguments A and return content of stdout, content of stderr and return code lift IO command to  state inspection command: a "show"'-like function is applied to the state & and the result is written to stderr. @change the state with a given function and return the new state set the state read the state run a  command with an initial state 1The  XmlFilter% type for filters working on a state 2The monad type for commands. It is an instance of StateIO from the  general module Control.Monad.MonadStateIO. 'The State has a system and a user part $ the user state is a type parameter AThe internal system state consists of a list of name-value pairs  of type (String, XmlTrees)-, so arbitrary lists of trees can be stored. H For options, often only strings are used as values, so a set of access + functions with string values is available I The error handling method can be controlled by an error handler filter, 0 the default filter issues the errors on stderr change the user state 3 1.parameter fct : the user state change function  returns : the new state  set the user state.  1.parameter s : the new state  returns : the new state  read the user state  returns : the current state  %change the system part of the state.  see also :    "set the system part of the state.  see also :    #read the system part of the state.  see also :   the initial system state 'an empty list of attribute value pairs *change the attributes in the system state set the error message handler get the error handler )set or change a single system parameter. / 1.parameter name : the name of the parameter 3 2.parameter value : the list of associated trees  returns : nothing  see also :  ,   8set or change a single system parameter of type string. / 1.parameter name : the name of the parameter - 2.parameter value : the (new) string value  returns : nothing  see also :  , setSysParamInt 5set or change a single integer type system parameter  see also :   Hadd (or change) all attributes of the document root to the system state  - returns : this read a system parameter / 1.parameter name : the name of the parameter ^ returns : the list of tres associated with the key, or the empty list for unknown parameters read a system string parameter / 1.parameter name : the name of the parameter A returns : the value, or the empty string for unknown parameters 2read a system parameter or return a default value / 1.parameter name : the name of the parameter * 2.parameter default : the default value 0 returns : the value if found, else the default !read an integer system parameter  1.parameter name :  2.parameter default :  see also :   *exec a XState command with initial state. 2 1.parameter initalState : the inital user state  2.parameter cmd : the command  returns : the i/%o command with result and user state /exec a XState command with initial user state.  ignore final user state. 0 like run0, but ignore the resulting user state &exec a XState command in th IO monad. # like run with the empty state (). #run a command in a new user state.  chain the system state part, A init new system state with the current one, run the command and A update the old system state with the resulting new system state 8 1.parameter initialUserState : the initial user state  2.parameter cmd : the command ; returns : the result of executing cmd and the final state  like chain'! but forget the final user state 8 1.parameter initialUserState : the initial user state  2.parameter cmd : the command , returns : only the result of executing cmd ,lift a XmlFilter to a XmlStateFilter filter ) issue all error nodes as error messages , and remove the error nodes from the result  1.parameter f : the filter 1 returns : the filter running in the state monad =all errors are filtered from the result and issued on stderr   lift an I/ O command  1.parameter cmd : the i/ o command  returns : the i/(o command lifted to the XML state monad !set the trace level.  convention: 0: no trace output (default) @1: trace important computation steps, e.g. accessing a document !2: trace small computation steps >3: output an intermediate result XmlTree in XML source format @4: output an intermediate result XmlTree in tree representation & 1.parameter level : the trace level  returns : nothing "get the current trace level. # returns : the current trace level #$trace output for arbitray commands. ' 1.parameter level : the trace level, , for which the command will be execuded  if level <= current trace level / 2.parameter cmd : the command to be executed  returns : nothing $'trace output function for simple text. ' 1.parameter level : like in traceCmd  2.parameter str : the test  returns : nothing %4trace output of the user part of the program state. ' 1.parameter level : like in traceCmd . 2.parameter showFct : the toString function  returns : nothing &$filter to reset the state attribute U  - returns : this 'report an error message. 4 returns : if the input tree n represents an error, res = [] a and the error is processed by the errror handler filter (default: error is issued on stderr)  else res = [n]  see also : 0  )$set the error level in system state *3default error handler for writing errors to stderr +8error message handler for collecting all error messages ) all messages are stored under attribute 4  they can be read with getSysParamTree a_error_log or by  applying the filter -  to the root node -3the filter for reading all collected error mesages @result is the list of error messages, the input tree is ignored .error level translation   (1) : warning,  7 (2): error (e.g. parse error, validation error, ...),  @ (3) : fatal error (document access error, internal error, ...) / short cut for issuing a warning  see also : ' , 0  0short cut for issuing an error  see also : '  1$short cut for issuing a fatal error  see also : ' , 0  3"checks the value of the attribute U in a document root. , if it contains a value greater or equal to , an error with error message  stored in attribute ?& is issued and the filter acts as the  filter  else its the  filter 4;add the error level and the module where the error occured e to the attributes of a document root node and remove the children when level is greater or equal to  5Ucheck whether tree is a document root and the status attribute has a value less than  6<check whether the error level attribute in the system state E is set to error, in this case the children of the document root are 4 removed and error info is added as attributes with 4   else nothing is changed 7;monadic filter for processing the attribute list of a tag. ' for other trees this filter acts like   see also : ,  ;      !"#$%&'()*+,-./01234567?      !"#$%&'()*+,-./0123456789:; << == >> ??@@AAB$document output for standard output  see also : C C%document output for arbitrary files. Result is the input document D%document output on a given file name Result is the input document  see also : C, B E(output of tree representation for trace G(output of text representation for trace BCDEFGHIJKL BDFHCEGIJKLMTpropagate all namespace declarations, check namespace constraints and issue errors. O If no error was found, result is the unchanged input tree, else the root node "/"% with an empty document is returned.  see also : ,  MMY|}~{zy      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~xw !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./01234567MN)The monadic parser for a whole document. 5 input must be a root node with a single text child. : Error messages are issued and global error state is set. O`Filter for substitution of all occurences of the predefined XML entites quot, amp, lt, gt, apos $ by equivalent character references Y     NONO P1filter for reading the content of a XML document 4input is a root node with the source as an attibute > the text is read, the encoding scheme is parsed and selected K and the input is translated into the internal UTF-8 string representation Q9filter for reading the content of an external XML entity  see also : P R(filter command for saving and restoring  the base URI @ 1.parameter f : the filter that possible changes the base URI a returns : a filter with the same effect as f, that restores the base URI after application of f S:filter command for running an action in a new URI context T2guessEncoding uses encoding attribute and content # to determine the encoding scheme. it'Vs assumed that an encoding spec has been tried to parse before guessing the encoding. UTF-8 is the default encoding Fother supported encodings are ISO-8859-1 (also known as ISO-Latin-1), 9 US-ASCII, UTF-16 or ISO-10646-UCS-2, UTF-16BE, UTF-16LE UGset the base URI, all other URIs are handled relative to this base URI the default base URI is file:///<current-working-dir>/  see also : V Vread the current base URI  see also : U W@transform an URI into an absolut URI using the current base URI & 1.parameter uri : the URI as string ( returns : the absolut URI as string or "" in case of an error X8predicate for testing the standalone document attribute Ythe hard io operations 4for reading a file or accessing a document via http " input must be a root node with a source attribute specifying the URI Z>compute the length of the data for a document read previously  by a call of '5getUrlContents. The result is stored as an attribute 8 value in the document root node. the attribute name is # PQRSTUVWXYZ PQYZTRSVUWXportable experimentalUwe Schmidt (uwe@fh-wedel.de)[Hmonadic filter for reading, parsing and checking a wellformed document. D the input tree must consist of a root node with a source attribute  in its attribute list. HAll attributes from the document root are copied into the system state, @ and may be queried by the monadic filters, e.g. trace options. KResult is the single element list containing the well-formed document tree I or, in case of errors, the document root with an empty list as children  and attributes U and ?! for error level and the module,  where the error occured. this is a shortcut for P .>> \ example for a main program:   main =  run' $  do  res <- getWellformedDoc $ newDocument " myfile.xml"  ... \parses a text node with N), processes the DTD and general entities 4 and transforms all char references into characters ]a filter for DTD processing $inclusion of external parts of DTD,  parameter entity substitution  conditional section evaluation Binput tree must represent a complete document including root node substitute parameter entities V result is the input tree with the list of text nodes as children or an error message -the dtd parameter entity substitution filter Jmerge the external and the internal part of a DTD into one internal part. J parameter entity substitution should be made before applying this filter + internal definitions shadow external ones #preliminary: no real merge is done ^!substitution of general entities 4input: a complete document tree including root node [\]^[\]^portablestableUwe Schmidt (uwe@fh-wedel.de)_"read a document and parse it with `&. The main entry point of this module +The input tree must be a root tree like in ', Text.XML.HXT.Parser.MainFunctions.getXmlDoc'. The content is read with P,  is parsed with `I and canonicalized (char refs are substituted in content and attributes,  but comment is preserved)  see also : 2Text.XML.HXT.Parser.DTDProcessing.getWellformedDoc `The HTML parsing filter The input is parsed with a%, everything is interpreted as HTML, R if errors ocuur, the parser will try to do some meaningfull action and continues P parsing. Afterwards the entitiy references for defined for XHTML are resovled, : any unresolved reference is transformed into plain text. Error messages Y during parsing and entity resolving are added as warning nodes into the resulting tree. HThe warnings are issued, if the 1. parameter noWarnings is set to True, 5 afterwards all are removed from the resulting tree. a)The pure HTML parser, usually called via `. _`ab_`abcIChecks if the attribute value meets the lexical constraints of its type. , 1.parameter dtdPart : the children of the DOCTYPE node G 2.parameter attrDecl : the declaration of the attribute from the DTD E returns : a function which takes an element (XTag or XDTD ATTLIST), P checks if the attribute value meets the lexical constraints = of its type and returns a list of errors 5Dispatches the attibute check by the attribute type. ' 1.parameter typ : the attribute type , 2.parameter dtdPart : the children of the DOCTYPE node G 3.parameter attrValue : the normalized attribute value to be checked G 4.parameter attrDecl : the declaration of the attribute from the DTD F returns : a functions which takes an element (XTag or XDTD ATTLIST), T checks if the attribute value meets the lexical constraints A of its type and returns a list of errors  8Checks the value of Enumeration attribute types. (3.3.1 / p.27 in Spec) G 1.parameter attrDecl : the declaration of the attribute from the DTD G 2.parameter attrValue : the normalized attribute value to be checked !3Checks the value of ENTITY attribute types. (3.3.1 / p.26 in Spec) , 1.parameter dtdPart : the children of the DOCTYPE node, to get the 1 unparsed entity declarations G 2.parameter attrDecl : the declaration of the attribute from the DTD G 3.parameter attrValue : the normalized attribute value to be checked "5Checks the value of ENTITIES attribute types. (3.3.1 / p.26 in Spec) , 1.parameter dtdPart : the children of the DOCTYPE node, to get the 1 unparsed entity declarations G 2.parameter attrDecl : the declaration of the attribute from the DTD G 3.parameter attrValue : the normalized attribute value to be checked #4Checks the value of NMTOKEN attribute types. (3.3.1 / p.26 in Spec) G 1.parameter attrDecl : the declaration of the attribute from the DTD G 2.parameter attrValue : the normalized attribute value to be checked $5Checks the value of NMTOKENS attribute types. (3.3.1 / p.26 in Spec) G 1.parameter attrDecl : the declaration of the attribute from the DTD G 2.parameter attrValue : the normalized attribute value to be checked %/Checks the value of ID attribute types. (3.3.1 / p.25 in Spec) G 1.parameter attrDecl : the declaration of the attribute from the DTD G 2.parameter attrValue : the normalized attribute value to be checked &2Checks the value of IDREF attribute types. (3.3.1 / p.26 in Spec) G 1.parameter attrDecl : the declaration of the attribute from the DTD G 2.parameter attrValue : the normalized attribute value to be checked '3Checks the value of IDREFS attribute types. (3.3.1 / p.26 in Spec) G 1.parameter attrDecl : the declaration of the attribute from the DTD G 2.parameter attrValue : the normalized attribute value to be checked (/Checks if the value of an attribute is a name. - 1.parameter msg : error message, should be Entity or Attribute value G 2.parameter attrDecl : the declaration of the attribute from the DTD G 3.parameter attrValue : the normalized attribute value to be checked )FGets the element name from an attribute list of an XDTD ATTLIST node. 9 1.parameter tag : the attibute list of an XDTD ATTLIST  returns : the element name *HGets the attribute name from an attribute list of an XDTD ATTLIST node. 9 1.parameter tag : the attibute list of an XDTD ATTLIST  returns : the attribute name d?Normalizes an attribute value with respect to its type. (3.3.3 / p.29 in Spec) Q 1.parameter attrDecl : the declaration of the attribute from the DTD. Expected K is a list. If the list is empty, no declaration exists. ; 2.parameter value : the attribute value to be normalized  returns : the normalized value +)Normalization of CDATA attribute values.  is already done when parsing 0 during entity substituion for attribute values ,4Normalization of attribute values other than CDATA. -4Reduce whitespace sequences to a single whitespace. cdcdeValidate a DTD. I returns : a functions which takes the DTD subset of the XmlTree, checks C if the DTD is valid and returns a list of errors . Returns a list of XText values. 0 1.parameter xtextList : a list of XText nodes ) returns : the values of the XText nodes /BValidation of Notations, checks if all notation names are unique. 0 Validity constraint: Unique Notation Name (4.7 / p.44 in Spec) , 1.parameter dtdPart : the children of the DOCTYPE node  returns : a list of errors 0Validation of Entities. =1. Issues a warning if entities are declared multiple times. Optional warning: (4.2 / p.35 in Spec) A2. Validates that a notation is declared for an unparsed entity. .Validity constraint: Notation Declared (4.2.2 / p.36 in Spec) , 1.parameter dtdPart : the children of the DOCTYPE node M 2.parameter notationNames : list of all notation names declared in the DTD  returns : a list of errors 1$Validation of Element declarations. =1. Validates that an element is not declared multiple times. :Validity constraint: Unique Element Type Declaration (3.2 / p.21 in Spec) T2. Validates that an element name only appears once in a mixed-content declaration. -Validity constraint: No Duplicate Types (3.2 / p.21 in Spec) V3. Issues a warning if an element mentioned in a content model is not declared in the  DTD. Optional warning: (3.2 / p.21 in Spec) , 1.parameter dtdPart : the children of the DOCTYPE node H 2.parameter elemNames : list of all element names declared in the DTD  returns : a list of errors 2&Validation of Attribute declarations.  M Issues a warning if an attribute is declared for an element type not itself  decared. Optinal warning: (3.3 / p. 24 in Spec) I2. Issues a warning if more than one definition is provided for the same J attribute of a given element type. Fist declaration is binding, later  definitions are ignored. Optional warning: (3.3 / p.24 in Spec) M3. Issues a warning if the same Nmtoken occures more than once in enumerated . attribute types of a single element type. Optional warning: (3.3.1 / p.27 in Spec) N4. Validates that an element type has not more than one ID attribute defined. 4Validity constraint: One ID per Element Type (3.3.1 / p.26 in Spec) T5. Validates that an element type has not more than one NOTATION attribute defined. :Validity constraint: One Notation per Element Type (3.3.1 / p.27 in Spec) 06. Validates that an ID attributes has the type  IMPLIED or  REQUIRED. 1Validity constraint: ID Attribute Default (3.3.1 / p.26 in Spec) 97. Validates that all referenced notations are declared. 0Validity constraint: Notation Attributes (3.3.1 / p.27 in Spec) A8. Validates that notations are not declared for EMPTY elements. 9Validity constraint: No Notation on Empty Element (3.3.1 /p.27 in Spec) I9. Validates that the default value matches the lexical constraints of it's type. 4Validity constraint: Attribute default legal (3.3.2 / p.28 in Spec) , 1.parameter dtdPart : the children of the DOCTYPE node H 2.parameter elemNames : list of all element names declared in the DTD M 3.parameter notationNames : list of all notation names declared in the DTD  returns : a list of errors fIRemoves doublicate declarations from the DTD, which first declaration is @ binding. This is the case for ATTLIST and ENTITY declarations. L returns : A function that replaces the children of DOCTYPE nodes by a list < where all multiple declarations are removed. effe 3MLookup-table which maps element names to their transformation functions. The * transformation functions are XmlFilters. g&filter for transforming the document. - 1.parameter dtdPart : the DTD subset (Node DOCTYPE) of the XmlTree 7 2.parameter doc : the document subset of the XmlTree  returns : a list of errors 4"Traverse the XmlTree in preorder. a 1.parameter transEnv : lookup-table which maps element names to their transformation functions * returns : the whole transformed document 5$Build all transformation functions. D 1.parameter dtdPart : the DTD subset, root node should be of type DOCTYPE S returns : lookup-table which maps element names to their transformation functions 6?Build a transformation function for the document root. By root / U is meant, which is the topmost dummy created by the parser. This function is only a  dummy, too. & returns : entry for the lookup-table 7/Build transformation functions for an element. , 1.parameter dtdPart : the children of the DOCTYPE node R 1.parameter nd : element declaration for which the transformation functions are  created & returns : entry for the lookup-table 8:Sort the attributes of an element in lexicographic order. ? returns : a function which takes an element (XTag), sorts its T attributes in lexicographic order and returns the changed element 9Normalize attribute values. D returns : a function which takes an element (XTag), normalizes its C attribute values and returns the changed element :2Set default attribute values if they are not set. L returns : a function which takes an element (XTag), adds missing attribute ; defaults and returns the changed element gg;ILookup-table which maps element names to their validation functions. The & validation functions are XmlFilters. hValidate a document. - 1.parameter dtdPart : the DTD subset (Node DOCTYPE) of the XmlTree 7 2.parameter doc : the document subset of the XmlTree  returns : a list of errors <"Traverse the XmlTree in preorder. \ 1.parameter valiEnv : lookup-table which maps element names to their validation functions  returns : list of errors = Build all validation functions. @ 1.parameter dtdPart : DTD subset, root node should be of type DOCTYPE O returns : lookup-table which maps element names to their validation functions >@Build a validation function for the document root. By root node / = is meant, which is the topmost dummy created by the parser. @ 1.parameter dtdPart : DTD subset, root node should be of type DOCTYPE & returns : entry for the lookup-table ?+Build validation functions for an element. , 1.parameter dtdPart : the children of the DOCTYPE node N 2.parameter nd : element declaration for which the validation functions are  created & returns : entry for the lookup-table @@Build validation functions for the content model of an element. ' Validity constraint: Element Valid (3 / p.18 in Spec) R 1.parameter nd : element declaration for which the content validation functions  are built C returns : a function which takes an element (XTag), checks if its P children match its content model and returns a list of errors AJBuild a regular expression from the content model. The regular expression " is provided by the module XmlRE. 8 1.parameter nd : node of the content model. Expected: CONTENT or  NAME 3 returns : regular expression of the content model B=Build validation functions for the attributes of an element. , 1.parameter dtdPart : the children of the DOCTYPE node T 2.parameter nd : element declaration for which the attribute validation functions  are created C returns : a function which takes an element (XTag), checks if its D attributes are valid and returns a list of errors C7Validate that all attributes of an element are unique. 0 Well-formdness constraint: Unique AttSpec (3.1 / p.19 in Spec) C returns : a function which takes an element (XTag), checks if its E attributes are unique and returns a list of errors DValidate that all #"REQUIRED attributes are provided. 1 Validity constraint: Required Attributes (3.3.2 / p.28 in Spec) , 1.parameter dtdPart : the children of the DOCTYPE node K 2.parameter nd : element declaration which attributes have to be checked C returns : a function which takes an element (XTag), checks if all P required attributes are provided and returns a list of errors EValidate that #*FIXED attributes match the default value. 5 Validity constraint: Fixed Attribute Default (3.3.2 / p.28 in Spec) , 1.parameter dtdPart : the children of the DOCTYPE node K 2.parameter nd : element declaration which attributes have to be checked C returns : a function which takes an element (XTag), checks if all X fixed attributes match the default value and returns a list of errors FCValidate that an element has no attributes which are not declared. 0 Validity constraint: Attribute Value Type (3.1 / p.19 in Spec) , 1.parameter dtdPart : the children of the DOCTYPE node K 2.parameter nd : element declaration which attributes have to be checked C returns : a function which takes an element (XTag), checks if all G attributes are declared and returns a list of errors GMValidate that the attribute value meets the lexical constraints of its type. / Validity constaint: Attribute Value Type (3.1 / p.19 in Spec) , 1.parameter dtdPart : the children of the DOCTYPE node K 2.parameter nd : element declaration which attributes have to be checked C returns : a function which takes an element (XTag), checks if all W attributes meet the lexical constraints and returns a list of errors hhHILookup-table which maps element names to their validation functions. The & validation functions are XmlFilters. i Perform the validation of the IDIDREFIDREFS constraints. - 1.parameter dtdPart : the DTD subset (Node DOCTYPE) of the XmlTree 7 2.parameter doc : the document subset of the XmlTree  returns : a list of errors I"Traverse the XmlTree in preorder. Z 1.parameter idEnv : lookup-table which maps element names to their validation functions  returns : list of errors JReturns the value of an element'-s ID attribute. The attribute name has to be  retrieved first from the DTD. F 1.parameter dtdPart : list of ID attribute definitions from the DTD F 2.parameter n : element which ID attribute value should be returned 0 returns : normalized value of the ID attribute KJBuild collector functions which return XTag nodes with ID attributes from  a document. , 1.parameter dtdPart : the children of the DOCTYPE node M returns : lookup-table which maps element names to their collector function L0Build validation functions for checking if IDREF/IDREFS values match a value  of some ID attributes. , 1.parameter dtdPart : the children of the DOCTYPE node E 2.parameter idNodeList : list of all XTag nodes with ID attributes N returns : lookup-table which maps element names to their validation function M:Validate that all ID values are unique within a document.  Validity constraint: ID (3.3.1 /p. 25 in Spec) E 1.parameter idNodeList : list of all XTag nodes with ID attributes , 2.parameter dtdPart : the children of the DOCTYPE node  returns : a list of errors NValidate that all IDREF/4IDREFS values match the value of some ID attribute. # Validity constraint: IDREF (3.3.1 / p.26 in Spec) \ 1.parameter idRefEnv : lookup-table which maps element names to their validation function - 2.parameter doc : the document to validate  returns : a list of errors iijEMain validation filter. Check if the DTD and the document are valid. I returns : a function which expects a complete document as XmlTree input = and returns a list of all errors found. kCheck if the DTD is valid. H returns : a function which expects an XmlTree from the parser as input H and returns a list of all errors found in the DTD. l4Check if the document corresponds to the given DTD. I returns : a function which expects a complete document as XmlTree input Q and returns a list of all errors found in the content part. mBfilter for transforming a document with respect to the given DTD. Validating parsers E are expected to normalize attribute values and add default values. ? This function should be called after a successful validation. A returns : a function which expects a complete XML document tree 4 and returns the transformed XmlTree nHRemoves doublicate declarations from the DTD which first declaration is @ binding. This is the case for ATTLIST and ENTITY declarations. L returns : A function that replaces the children of DOCTYPE nodes by a list < where all multiple declarations are removed. jklmnoojklnmpFmonadic filter for validating and transforming a wellformed document. the main function for validation. Mthe input tree must consist of a root node with a complete document and DTD. ` Result is the single element list containing same tree but tranformed with respect to the DTD, @ or, in case of errors, the root with an empty list of children jklmnoppq7convenient function for reading a XML document without H dealing with state monads, error messages collection and other details getXmlDocument calls s" with the list of parsing options , and an url or filename as document source. result is a triple = the resulting document tree with a root node containing all I meta info about the document (options, status info, http header, ...) ! the list of errors and warnings  the error level: one of , , ,  'example for input (see also example in r and example in t)   main :: IO ()  main  = do 5 (res, errs, rc) <- getXmlDocument [] "test.xml"  if rc >= c_err  then issueErrors errs  else processTree res  " issueErrors :: XmlTrees -> IO ()  " processTree :: XmlTree -> IO () for options see s, ! is set implicitly rthe inverse operation to q :writes a complete document tree to a file, writing can be : controlled by options, the real work is done with filter t. # useful options are the options of t. Rresult is a pair: 1.part is a list of error messages, 2. part is the return code, % the status info of the write filter Rthis filter is useful, when processing XML in an arbitray context in the IO monad 4an example main program for such an application is:  main :: IO ()  main  = do > (input, readErrs, rc) <- getXmlDocument [...] "test.xml"  if rc >= c_err ! then issueErrors readErrs  else processTree input  ! processTree :: XmlTree -> IO ()  processTree t $ = let res = computeNewTree input  in do ? (writeErrs, rc2) <- putXmlDocument [...] "out.xml" res  if rc2 >= c_err % then issueErrors writeErrs  else return ()  " issueErrors :: XmlTrees -> IO ()  & computeNewTree :: XmlTree -> XmlTree sthe main parsing filter ;this filter can be configured by an option list, a list of " option name, option value pairs. = the input tree must be a possibly empty document root tree. S all the options are stored as attributes in this root node to control processing. available options:  I1: use HTML parser, else use XML parser (default)  [5 : validate document (default), else skip validation  > : check namespaces, else skip namespace processing (default)  ? : canonicalize document (default), else skip canonicalization  LM : preserve comments during canonicalization, else remove comments (default)  PW : remove all whitespace, used for document indentation, else skip this step (default)  8J : indent document by inserting whitespace, else skip this step (default)  :Q : issue warnings, when parsing HTML (default), else ignore HTML parser warnings  9N : issue all error messages on stderr (default), or ignore all error messages  !Z : all error messages are collected during processing and appended to the result document 8 for further processing within the calling modules  W : trace level: values: 0 -4  N. : proxy for http access, e.g. www-cache:3128  ZM : for http access via external programm curl, default is native HTTP access  B* : more options for external program curl  S : the document source url  2 : default document encoding (, q, , ...)  examples:  * parseDocument [ (a_source, "test.xml") # , (a_validate, "0") ) , (a_encoding, isoLatin1)  ] emptyRoot reads document "test.xml") without validation and default encoding q  ? parseDocument [ (a_source, "http://www.haskell.org/") ) , (a_parse_html, "1") 6 , (a_proxy, "www-cache:3128") ) , (a_curl, "1") ) , (a_issue_warnings, "0")  ] emptyRoot wreads Haskell homepage with HTML parser ignoring any warnings and with http access via external program curl and proxy " www-cache" at port 3128  > parseDocument [ (a_source, "http://www.w3c.org/") M , (a_parse_html, "0") -- default M , (a_validate, "1") -- default , , (a_check_namespace, "1") , , (a_remove_whitespace, "1") , , (a_trace, "2")  ] emptyRoot qread w3c home page, validate and chech namespaces, remove whitespace between tags, trace activities with level 2  * parseDocument [ (a_source, "test.xml") * , (a_validate, "1") * , (a_check_namespace, "1") * , (a_collect_errors, "1") * , (a_issue_errors, "0")  ] emptyRoot  reads file "test.xml"<, validates it, checks namespaces, does not issue any erros a but collects errors and appends the list of errors to the single element list for the document. D this enables the calling application to define own error handlers. t&the main filter for writing documents 5this filter can be configured by an option list like q available options are  8> : indent document for readability, (default: no indentation)  PJ : remove all redundant whitespace for shorten text (default: no removal)  E- : destination file for document, default is "-" for stdout  D$ : encoding of document, default is 2 or   G0 : (default) issue XML: quote special XML chars >,<,",',& 3 add XML processing instruction 8 and encode document with respect to D, X if explizitly switched of, the plain text is issued, this is useful V for non XML output, e.g. generated Haskell code, LaTex, Java, ...  R8 : show tree representation of document (for debugging)  Q: : show Haskell representaion of document (for debugging)  9, ! : see s 5a typical main program running in the XmlState monad  has the following structure:   main :: IO ()  main  = do e argv <- getArgs -- get the commandline arguments r (inp, outp, options) <- cmdlineOpts argv -- and evaluate them, return a key-value list \ -- and input and output [ res <- run' $ application inp outp options $ emptyRoot -- run the application   exitWith (if null res ' then ExitFailure (-1) " else exitSuccess  )  D application :: String -> String -> Attributes -> XmlStateFilter ()  application inp outp al ^ = parseDocument (al ++ [(a_source, inp)]) -- set options and source Z .>> -- and parse document U processDocument -- the hard work  .>> U writeDocument [(a_output_file, outp)] -- issue results  .>> T checkStatus -- check errors  O,wrapper filter for running a monadic filter  controlled by common options 'input tree must be a complete document 9 parameters and default parameters can be used to contol 8 the filer and common tasks like error message handling qrstqrst |}~{zy      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~xw !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./01234567BCDEFGHIJKLM     NOPQRSTUVWXYZ[\]^_`abjklmnopqrstP!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     5       ! " " # $    % & ' ( ) * + , - . / 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 UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~{~}|      !"#$%&'()*+,-./012131415161718191:1;1<1=1>1?1@1A1B1C1D1E1F1G1H1I1J1K1L1M1N1O1P1Q1R1S1T1U1V1W1X1Y1Z1[1\1]1^1_1`1a1b1c1d1e1f1g1h1i1j1k1l1m1n1o1p1q1r1s1t1u1v1w1x1y1z1{1|1}1~111111111111111111111111111111111111111111111111111111111111111111111      !"#$%&'()*+,-./012345678797:7;7<7=7>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[T\]^_`abcdefgThijklmnhxt-filter-8.2.0Text.XML.HXT.Validator.RE!Text.XML.HXT.DOM.XmlTreeFunctionsText.XML.HXT.DOM.XmlTreeFilter Text.XML.HXT.DOM.NamespaceFilterText.XML.HXT.DOM.EditFiltersText.XML.HXT.Validator.XmlRESystem.PipeOpenControl.Monad.MonadStateIOText.XML.HXT.DOM.XmlStateText.XML.HXT.Parser.DefaultURI'Text.XML.HXT.Parser.ProtocolHandlerFile+Text.XML.HXT.Parser.ProtocolHandlerHttpCurl-Text.XML.HXT.Parser.ProtocolHandlerHttpNative3Text.XML.HXT.Parser.ProtocolHandlerHttpNativeOrCurl#Text.XML.HXT.Parser.ProtocolHandlerText.XML.HXT.Parser.XmlOutputText.XML.HXT.DOM.NamespaceText.XML.HXT.Parser.XmlParserText.XML.HXT.Parser.XmlInput!Text.XML.HXT.Parser.DTDProcessingText.XML.HXT.Parser.HtmlParser/Text.XML.HXT.Validator.AttributeValueValidation$Text.XML.HXT.Validator.DTDValidation(Text.XML.HXT.Validator.DocTransformation$Text.XML.HXT.Validator.DocValidation#Text.XML.HXT.Validator.IdValidation'Text.XML.HXT.Validator.ValidationFilter!Text.XML.HXT.Validator.Validation!Text.XML.HXT.Parser.MainFunctionsText.XML.HXT.DOM.XmlTreeText.XML.HXT.DOMText.XML.HXT.ParserRERE_ALTRE_SEQRE_OPTRE_PLUSRE_REPRE_DOTRE_SYMRE_UNITRE_ZEROre_zerore_unitre_symre_dotre_repre_plusre_optre_seqre_altnullablematchescheckREprintRE isXCdataNodeisXCharRefNode isXCmtNode isXDTDNode isXAttrNodeisXEntityRefNode isXErrorNode isXPiNode isXTagNode isXTextNode isRootNode isTagNode isOfTagNode isAttrNode isOfAttrNode isTextNode isOfTextNodeisPiNode isOfPiNode isDTDElemNode isErrorNode textOfXNode mkXTagTree mkQTagTree mkXNsTagTreenewRoot emptyRoot newDocument newDocument' mkRootTree mkXTextTreemkXCharRefTreemkXEntityRefTree mkXCmtTree mkXDTDTree mkXAttrTree mkQAttrTree mkXNsAttrTree mkXPERefTree mkXPiTree mkXmlDeclTree mkXCdataTree mkXErrorTreemaybeString2XText showXText showXCharRefshowXEntityRef showXErrorsxmlTreesToStringxmlTreesToTextxmlContentModelToStringnameOf localPartOf namespaceOfprefixOfuniversalNameOf attrlOfDTD valueOfDTD ofDTDequalsxcmtxerrxwarnxtextxtagxattrtoTreeltoAttrl fromTreel fromAttrlisRootisTagisNsTag hasLocalPart hasPrefix hasNamespaceisOfTaghasAttr hasNsAttrhasValueisPiisXmlPiisOfPiisXCdata isXCharRefisXCmtisXDTD isXEntityRefisXErrorisXPiisXTagisXAttrisAttrisNsAttrisOfAttrisXTextisTextisOfText isWhiteSpace isDoctype isAttlist isElementisEntityisPeRef isDTDName isCondSectisParameterEntity isNotationisDefaultAttrKindisEnumAttrTypeisFixedAttrKind isIdAttrTypeisIdRefAttrTypeisNotationAttrTypeisRequiredAttrKindisAttlistParameterEntityisEmptyElementisMixedContentElementisElemWithContentisAttlistOfElementisElemContentParamEntityisUnparsedEntityisExternalParameterEntityisInternalParameterEntity isWarningisError isFatalErrormkXTagmkQTagmkXNsTagmkXAttrmkQAttr mkXNsAttrmkXText mkXCharRef mkXEntityRefmkXCmtmkXDTDmkXCdatamkXPimkXErrorgetNamegetAttrlgetValue getNsValue getDTDValuegetXCmt getXCdata replaceQName modifyText modifyQName processAttrl processAttr replaceAttrldel1Attradd1AttraddAttrladdAttr addAttrInt modifyAttr addDTDAttr+=++=valueOf intValueOftagstagatagetagqetagqtagrootTagattrqattrsattrtxtcmtspicdatadtdwarnerrfatal hasOptionNamespaceTablepropagateNamespacespropagateNamespaceEnvvalidateNamespacesvalidate1NamespacesisNamespaceDecl removeCommentremoveAllCommentremoveWhiteSpaceremoveAllWhiteSpacetransfAllCdataEscapedtransfCdataEscapedtransfAllCdata transfCdata transfCharReftransfAllCharRefcanonicalizeTreecanonicalizeAllNodescanonicalizeForXPath collapseXTextcollapseAllXText indentDocremoveDocWhiteSpace escapeXmlTextescapeXmlAttrValue escapeXmlDoc unparseXmlDoc addXmlPiToDocnumberLinesInXmlDoc numberLinestreeRepOfXmlDochaskellRepOfXmlDocaddHeadlineToXmlDocpopenStateIOSTIOtransiotrcState changeStatesetStategetStaterun :CoStateIO$f1XmlStateFilterXStateXmlStatesysState userState SysStateAttrsSysState sysStateAttrssysStateErrorHandlerchangeSysState setSysState getSysStateinitialSysStatechangeSysStateAttrssetSysErrorHandlergetSysErrorHandlersetSysParamTree setSysParamsetSysParamIntsetSystemParamsgetSysParamTree getSysParamgetSysParamWithDefaultgetSysParamIntrun0run'chain'chainliftF setTraceLevel getTraceLeveltraceCmdtrace traceState clearStatus issueErrorerrorMsgHandlersetErrorMsgLevelerrorMsgToStderrerrorMsgLoggingerrorMsgLoggingAndToStderr getErrorMsgerrClass issueWarnissueErr issueFataladdFatal checkStatus setStatusstatusOk checkResult processAttrM $WXmlState $WSysState setDefaultURIgetFileContentsgetHttpContentsWithCurlgetHttpContentsWithHttpgetHttpContentsNativeOrWithCurlgetProtocolHandler putXmlDoc hPutXmlDocputXmlDocToFile hPutXmlTree putXmlTree hPutXmlSource putXmlSourcetraceFtraceMsg traceTree traceSourcepropagateAndValidateNamespaces parseXmlDocsubstXmlEntitiesgetXmlContentsgetXmlEntityContentsrunInLocalURIContextrunInNewURIContextguessDocEncoding setBaseURI getBaseURI getAbsolutURIisStandaloneDocumentgetUrlContentsgetContentLengthgetWellformedDoccheckWellformedDoc processDTDprocessGeneralEntities getHtmlDoc parseHtmlDoc runHtmlParsersubstHtmlEntitiescheckAttributeValuenormalizeAttributeValue validateDTDremoveDoublicateDefs transform validateDoc validateIdsvalidate getDTDSubsetgetValidatedDocgetXmlDocumentputXmlDocument parseDocument writeDocumentrem_repdelta hxt-8.2.0Text.XML.HXT.DOM.ShowXmlxshow showElemTypeData.Tree.NTree.FilternonemodifyChildrencatData.Tree.NTree.TypeDefsNTreesNTreeText.XML.HXT.DOM.QualifiedName qualifiedNameTSFilterText.XML.HXT.DOM.TypeDefsXNodeTFilterQNameText.XML.HXT.DOM.XmlTreeTypesAttrNameTagName XmlFilter XmlSFilteraName cardNTree depthNTree foldNTree formatNTreemapNTreemkNode nTreeToListtNameData.AssocList AssocList addEntriesaddEntry delEntriesdelEntryhasEntrylookup1 lookupDefData.Tree.ClassTreecardTreechangeChildren changeNode depthTreefoldTree formatTree getChildrengetNodeisInnerisLeafmkLeafmkTree nodesTree setChildrensetNode$$$$<++++++>>..>.>.>>/>catMchoicechoiceM containing containingMdeepdeepestguardsguardsMifMiffinsertChildrenAfterinsertChildrenAtisOfisOfNodeliftMfmkNTree modifyNode modifyNode0multinegnoneM notContainingoorElse performActionprocessBottomUpprocessBottomUpIfNotprocessBottomUpMprocessChildrenprocessChildrenMprocessTopDownprocessTopDownMprocessTopDownUntilreplaceChildren replaceNode satisfiesseqFseqM substChildrenthisthisMwhenwhenMwhenNotwhenNotM formatNTreeF localPart namePrefix namespaceUribuildUniversalName equalQName equalQNameBy equivQNameequivUrimkNamemkNsNamemkPrefixLocalPartmkQName mkSNsNamenormalizeNsUri nullQName universalName universalUri Attributes ChildNodesDTDElemATTLISTCONDSECTCONTENTDOCTYPEELEMENTENTITYNAMENOTATIONPENTITYPEREFNsEnvXAttrXCdataXCharRefXCmtXDTD XEntityRefXErrorXPiXTagXText XmlNodeSetXNS attrNodes childNodesthisNodeXmlTreeXmlTreesc_errc_fatalc_okc_warnText.XML.HXT.DOM.XmlKeywordsk_pcdatak_emptyk_anytransferPrefixa_xml iso8859_1k_perefa_canonicalizea_check_namespacesa_check_restrictionsa_collect_errorsa_columna_contentLength a_defaulta_default_baseuria_do_not_canonicalizea_do_not_check_namespacesa_do_not_check_restrictionsa_do_not_collect_errorsa_do_not_issue_errorsa_do_not_issue_warningsa_do_not_preserve_commenta_do_not_remove_whitespacea_do_not_use_curla_do_not_validatea_do_not_validate_externalRefa_do_not_validate_include a_encodinga_error a_error_loga_helpa_ignore_encoding_errorsa_ignore_none_xml_contentsa_indenta_issue_errorsa_issue_warningsa_kinda_line a_mime_types a_modifiera_modulea_name a_no_xml_pia_options_curla_output_changesa_output_encoding a_output_file a_output_html a_output_xmla_parse_by_mimetype a_parse_html a_parse_xmla_perefa_preserve_commenta_propagate_errorsa_proxya_relax_schemaa_remove_whitespacea_show_haskell a_show_treea_source a_standalonea_status a_tagsoupa_tracea_typea_url a_use_curl a_validatea_validate_externalRefa_validate_includea_value a_verbose a_versiona_xmlns httpPrefix iso8859_10 iso8859_11 iso8859_13 iso8859_14 iso8859_15 iso8859_16 iso8859_2 iso8859_3 iso8859_4 iso8859_5 iso8859_6 iso8859_7 iso8859_8 iso8859_9 isoLatin1k_cdata k_default k_entitiesk_entity k_enumerationk_fixedk_idk_idrefk_idrefsk_ignore k_implied k_includek_ndata k_nmtoken k_nmtokens k_notationk_public k_requiredk_systemrelaxNamespacestringProtocolt_roott_xmltransferDefaultURItransferEncodingtransferMessagetransferMimeTypetransferProtocoltransferStatus transferURItransferVersionucs2 unicodeStringusAsciiutf16utf16beutf16leutf8v_0v_1v_any v_childrenv_choicev_emptyv_mixedv_nov_nullv_optionv_pcdatav_plusv_seqv_starv_yes xmlNamespacexmlnsNamespace$Text.XML.HXT.DOM.NamespacePredicatesisWellformedQNameisWellformedQualifiedNameisDeclaredNamespaceisWellformedNSDeclisNCName setNamespacexmlnsQN escapeStringText.XML.HXT.DOM.FormatXmlTree formatXmlTreeformatXmlContentsText.XML.HXT.DOM.XmlOptionsgeneralOptions inputOptions isTrueValue optionIsSet outputOptions relaxOptions removeOptions selectOptions showOptionsversionOptions"Text.XML.HXT.Parser.XmlTokenParser separatorallBut1 attrValueT' entityTokensTdqsqsemiallBut asciiLetter attrValue attrValueTbarcharRefcharRefTcommaconcResencName entityCharT entityRef entityRefT entityValue entityValueTeqgtkeywordkeywordslparltmkListnamenameTnamesncNamenmtokennmtokenTnmtokens peReference peReferenceT pubidLiteralqNamequoted reference referenceTrparsPacesPace0 singleChar singleChars singleCharsTskipSskipS0 systemLiteral versionNumText.XML.HXT.Parser.XmlParsecparseXmlEncodingSpecxread parseXmlPartcDSectcharData charData'commentcontentcontentWithTextDecl doctypedecldocument document'element encodingDecl markupdeclmiscpI parseNMToken parseNameparseXmlAttrValueparseXmlContentparseXmlDTDPartparseXmlDocEncodingSpecparseXmlDocumentparseXmlEntityEncodingSpecparseXmlGeneralEntityValue parseXmlTextprologremoveEncodingSpecsDDecltextDecl versionInfoxMLDeclxMLDecl' substPEref'substParamEntity mergeDTDsText.XML.HXT.Parser.HtmlParsec emptyHtmlTags closesHtmlTagisEmptyHtmlTagisInnerHtmlTagOfparseHtmlContentparseHtmlDocument parseHtmlText checkValuecheckValueEnumerationcheckValueEntitycheckValueEntitiescheckValueNmtokencheckValueNmtokens checkValueIdcheckValueIdrefcheckValueIdrefs checkForName getElemName getAttrNamecdataNormalizationotherNormalizationreduceWSSequencesgetXTextValuesvalidateNotationsvalidateEntitiesvalidateElementsvalidateAttributes TransEnvTable traverseTreebuildAllTransformationFunctionsbuildTransRootbuildTransformationFunctionslexicographicAttributeOrdernormalizeAttributeValuessetDefaultAttributeValues ValiEnvTablebuildAllValidationFunctionsbuildValidateRootbuildValidateFunctionsbuildContentValidationcreateREbuildAttributeValidationnoDoublicateAttributescheckRequiredAttributescheckFixedAttributescheckNotDeclardAttributescheckValuesOfAttributes IdEnvTable getIdValuebuildIdCollectorFctsbuildIdrefValidationFctscheckForUniqueIdscheckIdReferencesprocessDocument