1%d      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc None,Void elements as defined by the HTML5 spec. HElements that XmlHtml treats as raw text by default. Raw text elements G are not allowed to have any other tags in them. This is necessary to M support the Javascript less than operator inside a script tag, for example. The library uses the ) function everywhere instead of checking F this set directly because that gives us an escape hatch to avoid the  default behavior if necessary. JDetermine whether a tag should be treated as raw text. Raw text elements G are not allowed to have any other tags in them. This is necessary to M support the Javascript less than operator inside a script tag, for example. If a tag is in the + set, this function allows you to override  that behavior by adding the  xmlhtmlNotRaw attribute. Conversely, if a  tag is not in the + set, this function allows you to override  that by adding the  xmlhtmlRaw attribute to the tag. GThis is the function that is actually used in the parser and renderer.  ; is not used any more, but is still provided for backwards L compatibility and to let you see which tags are treated as raw by default. *List of elements with omittable end tags. ETags which should be considered automatically ended in case one of a  certain set of tags pops up. EPredefined character entity references as defined by the HTML5 spec. @defghijklmnopqrstuvwxyz{|}~@defghijklmnopqrstuvwxyz{|}~NoneCThe character encoding of a document. Currently only the required & character encodings are implemented. 9The internal subset is unparsed, but preserved in case it' s actually  wanted. BAn external ID, as in a document type declaration. This can be a ? SYSTEM identifier, or a PUBLIC identifier, or can be omitted. AA document type declaration. Note that DTD internal subsets are  currently unimplemented. FA node of a document structure. A node can be text, a comment, or an F element. XML processing instructions are intentionally omitted as a J simplification, and CDATA and plain text are both text nodes, since they + ought to be semantically interchangeable. DRepresents a document fragment, including the format, encoding, and 3 document type declaration as well as its content. ,Determines whether the node is text or not. !1Determines whether the node is a comment or not. "2Determines whether the node is an element or not. #%Gives the tag name of an element, or  if the node isn't an  element. $5Retrieves the attribute with the given name. If the  is not an  element, the result is always  %(Checks if a given attribute exists in a . &4Sets the attribute name to the given value. If the  is not an  element, this is the identity. ':Gives the entire text content of a node, ignoring markup. (JGives the child nodes of the given node. Only elements have child nodes. ),Gives the child elements of the given node. *?Gives all of the child elements of the node with the given tag  name. +CGives the first child element of the node with the given tag name,  or $ if there is no such child element. ,HGives the descendants of the given node in the order that they begin in  the document. -IGives the descendant elements of the given node, in the order that their $ start tags appear in the document. .5Gives the descendant elements with a given tag name. /HGives the first descendant element of the node with the given tag name,  or  if there is no such element. FRetrieves the preferred name of a character encoding for embedding in  a document.  Gets the encoding function from  to  for an encoding.  Gets the decoding function from  to  for an encoding. /  !"#$%&'()*+,-.//  !"#$%&'()*+,-./    !"#$%&'()*+,-./None9Represents the state of a text scanner, for use with the   parser combinator. HGet an initial guess at document encoding from the byte order mark. If  the mark doesn'9t exist, guess UTF-8. Otherwise, guess according to the  mark. 2Checks if a document contains invalid characters.  Parses a : value and gives back the result. The parser is expected  to match the entire string. /Consume input as long as the predicate returns , and return the I consumed input. This parser does not fail. If it matches no input, it  will return an empty string. /Consume input as long as the predicate returns , and return the L consumed input. This parser requires the predicate to succeed on at least H one character of input. It will fail if the first character fails the  predicate. The equivalent of Parsec'0s string combinator, but for text. If there is M not a complete match, then no input is consumed. This matches the behavior  of string# from the attoparsec-text package. JScans text and progresses through a DFA, collecting the complete matching  text as it goes. The parser to match  Name of the source file (can be "") Text to parse  None6States for the DOCTYPE internal subset state machine. JThis is my best guess as to the best rule for handling document fragments I for processing. It is essentially modeled after document, but allowing  multiple nodes. The requirement to not contain ]]> is for SGML compatibility. We F deliberately choose to not enforce it. This makes the parser accept < strictly more documents than a standards-compliant parser. "Always returns Nothing since there'$s no representation for a PI in the  document tree. *Return value is the encoding, if present. 3Internal subset is parsed, but ignored since we don't have data types to  store it.  Internal DOCTYPE subset. We don')t actually parse this; just scan through 8 and look for the end, and store it in a block of text. ,Results are (tag name, attributes, isEmpty) ++" None0DFunction for rendering XML nodes without the overhead of creating a  Document structure. GProcess the first node differently to encode leading whitespace. This  lets us be sure that parseXML is a left inverse to render. 000 NoneDWhen parsing an element, three things can happen (besides failure): 8 The end tag matches the start tag. This is a Matched. H The end tag does not match, but the element has an end tag that can be B omitted when there is no more content in its parent. This is an F ImplicitLast. In this case, we need to remember the tag name of the 4 end tag that we did find, so as to match it later. H A start tag is found such that it implicitly ends the current element. C This is an ImplicitNext. In this case, we parse and remember the F entire element that comes next, so that it can be inserted after the  element being parsed. HHTML version of document fragment parsing rule It differs only in that  it parses the HTML version of  and returns an . 3Internal subset is parsed, but ignored since we don't have data types to  store it. @From 8.2.2.3 of the HTML 5 spec, omitting the very high control J characters because they are unlikely to occur and I got tired of typing.  NoneAnd, the rendering code. 1EFunction for rendering HTML nodes without the overhead of creating a  Document structure.  HTML allows & so long as it is not  ambiguous (i.e., looks like an / entity). So we have a special case for that. GProcess the first node differently to encode leading whitespace. This  lets us be sure that  parseHTML is a left inverse to render. 111None2Parses the given XML fragment. 3FParses the given HTML fragment. This enables HTML quirks mode, which L changes the parsing algorithm to parse valid HTML 5 documents correctly. 4 Renders a . 2@Name of document source (perhaps a filename) for error messages Document contents !The document or an error message 3@Name of document source (perhaps a filename) for error messages Document contents !The document or an error message 450  !"#$%&'()*+,-./0123453    !"#$%&'()*+,-./2340152345None/6#A zipper for XML document forests. 7 Retrieves the current node of a 6 Just the tag of an element  ?Reconstructs an element from a tag and a list of its children. 8 Builds a 68 for navigating a tree. That is, a forest with a single  root . 9 Builds a 67 for navigating a forest with the given list of roots. B The cursor is initially positioned at the left-most node. Gives   if the list is empty. :@Retrieves the root node containing the current cursor position. ;Retrieves the entire forest of s corresponding to a 6. <Retrieves a list of the ,s at the same level as the current position * of a cursor, including the current node. = Navigates a 6 to its parent in the document. > Navigates a 6- up through parents to reach the root level. ? Navigates a 6$ down to the indicated child index. @ Navigates a 6 down to its first child. A Navigates a 6 down to its last child. BMoves a 6 to its left sibling. CMoves a 6 to its right sibling. DMoves a 67 to the next node encountered in a depth-first search. + If it has children, this is equivalent to @. Otherwise, if it 1 has a right sibling, then this is equivalent to C. Otherwise, the @ cursor moves to the first right sibling of one of its parents.  Repeats the given move until a 6 is obtained that matches the  predicate. E Navigates a 60 to the first child that matches the predicate. F Navigates a 6, to the nearest left sibling that matches a  predicate. G Navigates a 6- to the nearest right sibling that matches a  predicate. HIDoes a depth-first search for a descendant matching the predicate. This ( can match the current cursor position. IDetermines if the 6 is at a root node. JDetermines if the 6 is at a first child. KDetermines if the 6 is at a last child. LDetermines if the 6 is at a leaf node. MDetermines if the 60 is at a child node (i.e., if it has a parent). NDetermines if the 6( is at a non-leaf node (i.e., if it has  children). OGets the index of the 6 among its siblings. PReplaces the current node. Q2Modifies the current node by applying a function. RAModifies the current node by applying an action in some functor. SInserts a new & to the left of the current position. TInserts a new ' to the right of the current position. UInserts a list of new 's to the left of the current position. VInserts a list of new (s to the right of the current position. W Inserts a , as the first child of the current element. X Inserts a + as the last child of the current element. YInserts a list of 0s as the first children of the current element. ZInserts a list of /s as the last children of the current element. [Inserts a new 0 to the left of the current position, and moves  left to the new node. \Inserts a new 1 to the right of the current position, and moves  right to the new node. ] Removes the . to the left of the current position, if any. ^ Removes the / to the right of the current position, if any. _Removes the current ,, and moves the Cursor to its left sibling,  if any. `Removes the current -, and moves the Cursor to its right sibling,  if any. aRemoves the current ., and moves the Cursor to its parent, if any. 36 7   89:;<=>?@ABCD  predicate move starting point EFGHIJKLMNOPQRSTUVWXYZ[\]^_`a,6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a-6789:;7<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a.6 7   89:;<=>?@ABCD EFGHIJKLMNOPQRSTUVWXYZ[\]^_`aNone Render a , to Text. This is only meant to be used for = shorter strings, since it is inefficient for large strings.  Render a  to an appending list of nodes  Render some  to an appending list of nodes bRender HTML to an xmlhtml  c'Render HTML to a list of xmlhtml nodes bcbcbcbc    !"#$%&'()*+,-./0123456789: ;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~>           > @      xmlhtml-0.2.2Text.XmlHtml.HTML.Meta Text.XmlHtmlText.XmlHtml.CursorText.Blaze.Renderer.XmlHtmlText.XmlHtml.CommonText.XmlHtml.TextParserText.XmlHtml.XML.ParseText.XmlHtml.XML.RenderText.XmlHtml.HTML.ParseText.XmlHtml.HTML.RendervoidTags rawTextTags isRawTextendOmittableLastendOmittableNextpredefinedRefsEncodingUTF16LEUTF16BEUTF8InternalSubsetNoInternalSubset InternalText ExternalID NoExternalIDSystemPublicDocTypeNodeElement elementTag elementAttrselementChildrenCommentTextNodeDocument HtmlDocument XmlDocument docEncodingdocType docContent isTextNode isComment isElementtagName getAttribute hasAttribute setAttributenodeText childNodes childElementschildElementsTagchildElementTagdescendantNodesdescendantElementsdescendantElementsTagdescendantElementTagrenderXmlFragmentrenderHtmlFragmentparseXML parseHTMLrender renderDocTypeCursorcurrentfromNode fromNodestopNodetopNodessiblingsparentrootgetChild firstChild lastChildleftrightnextDF findChildfindLeft findRightfindRecisRootisFirstisLastisLeafisChild hasChildren getNodeIndexsetNode modifyNode modifyNodeM insertLeft insertRightinsertManyLeftinsertManyRightinsertFirstChildinsertLastChildinsertManyFirstChildinsertManyLastChild insertGoLeft insertGoRight removeLeft removeRight removeGoLeft removeGoRight removeGoUp renderHtmlrenderHtmlNodesreftab1reftab2reftab3reftab4reftab5reftab6reftab7reftab8reftab9reftab10reftab11reftab12reftab13reftab14reftab15reftab16reftab17reftab18reftab19reftab20reftab21reftab22reftab23reftab24reftab25reftab26reftab27reftab28reftab29reftab30reftab31reftab32reftab33reftab34reftab35reftab36reftab37reftab38reftab39reftab40reftab41reftab42reftab43reftab44reftab45reftab46reftab47reftab48reftab49reftab50reftab51reftab52reftab53reftab54reftab55reftab56reftab57reftab58base Data.MaybeNothing encodingNameencoder text-0.11.3.1Data.Text.InternalTextbytestring-0.10.0.2Data.ByteString.Internal ByteStringdecoderisUTF16fromText ScanStatescanText guessEncoding isValidChar parseText takeWhile0ghc-prim GHC.TypesTrue takeWhile1textScanFail ScanFinishScanNextparse parsec-3.1.3Text.Parsec.TextParser GenParserInternalDoctypeState docFragmentcharDataprocessingInstructionxmlDecl docTypeDeclinternalDoctypeemptyOrStartTag IDSCommentE1 IDSCommentD1 IDSComment IDSCommentS3 IDSCommentS2 IDSCommentS1 IDSInQuote IDSScanningIDSStart whiteSpaceisNameStartChar isNameCharname attrValue systemLiteral pubIdLiteral isPubIdCharcommentpiTargetcdatacdSectprolog versionInfoeqmiscsdDeclelement attributeendTagcontentcharRef reference entityRef externalID encodingDecl firstNodeinternalSubsetsysIDpubIDnodeescapedentity ElemResult isControlChar ImplicitNext ImplicitLastMatched finishElementattrNamequotedAttrValueunquotedAttrValue finishCharReffinishEntityRefTagfromTagsearchleftsrightsparentsfromChoiceStringTextblaze-markup-0.5.1.5Text.Blaze.Internal ChoiceStringfromChoiceString renderNodesblaze-html-0.6.1.1Text.Blaze.HtmlHtml