| ||||||||
| ||||||||
Description | ||||||||
Version : $Id: Edit.hs,v 1.8 20061112 14:52:59 hxml Exp $ common edit arrows | ||||||||
Synopsis | ||||||||
Documentation | ||||||||
| ||||||||
Applies some Canonical XML rules to a document tree. The rule differ slightly for canonical XML and XPath in handling of comments Note: This is not the whole canonicalization as it is specified by the W3C Recommendation. Adding attribute defaults or sorting attributes in lexicographic order is done by the transform function of module Text.XML.HXT.Validator.Validation. Replacing entities or line feed normalization is done by the parser. Rules: remove DTD parts, processing instructions, comments and substitute char refs in attribute values and text Not implemented yet:
| ||||||||
| ||||||||
Canonicalize a tree for XPath Like canonicalizeAllNodes but comment nodes are not removed | ||||||||
| ||||||||
Canonicalize the contents of a document substitutes all char refs in text and attribute values, removes CDATA section and combines all sequences of resulting text nodes into a single text node | ||||||||
| ||||||||
Applies collapseXText recursively. see also : collapseXText | ||||||||
| ||||||||
Collects sequences of text nodes in the list of children of a node into one single text node. This is useful, e.g. after char and entity reference substitution | ||||||||
| ||||||||
escape all special XML chars into XML entity references or char references convert the special XML chars < and & in text nodes into prefefiened XML entity references, in attribute values also ', ", >, \n, \r and \t are converted into entity or char references, in comments nothing is converted (see XML standard 2.4, useful e.g. for JavaScript). | ||||||||
| ||||||||
escape all special HTML chars into XHTML entity references or char references convert the special XML chars < and & and all none ASCII chars in text nodes into prefefiened XML or XHTML entity references, in attribute values also ', ", >, \n, \r and \t are converted into entity or char references, in comments nothing is converted | ||||||||
| ||||||||
convert a document into a Haskell representation (with show). Useful for debugging and trace output. see also : treeRepOfXmlDoc, numberLinesInXmlDoc | ||||||||
| ||||||||
convert a document into a text representation in tree form. Useful for debugging and trace output. see also : haskellRepOfXmlDoc, numberLinesInXmlDoc | ||||||||
| ||||||||
| ||||||||
filter for indenting a document tree for pretty printing. the tree is traversed for inserting whitespace for tag indentation. whitespace is only inserted or changed at places, where it isn't significant, is's 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 or a document fragment result is the semantically equivalent formatted tree. see also : removeDocWhiteSpace | ||||||||
| ||||||||
convert a document into a text and add line numbers to the text representation. Result is a root node with a single text node as child. Useful for debugging and trace output. see also : haskellRepOfXmlDoc, treeRepOfXmlDoc | ||||||||
| ||||||||
remove Comments: none when isCmt | ||||||||
| ||||||||
remove all comments recursively | ||||||||
| ||||||||
simple filter for removing whitespace. no check on sigificant whitespace, e.g. in HTML <pre>-elements, is done. see also : removeAllWhiteSpace, removeDocWhiteSpace | ||||||||
| ||||||||
simple recursive filter for removing all whitespace. removes all text nodes in a tree that consist only of whitespace. see also : removeWhiteSpace, removeDocWhiteSpace | ||||||||
| ||||||||
filter for removing all not significant whitespace. the tree traversed for removing whitespace between elements, 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 input is root node of the document to be cleaned up, output the semantically equivalent simplified tree see also : indentDoc, removeAllWhiteSpace | ||||||||
| ||||||||
converts a CDATA section node into a normal text node | ||||||||
| ||||||||
converts CDATA sections in whole document tree into normal text nodes | ||||||||
| ||||||||
converts character references to normal text | ||||||||
| ||||||||
recursively converts all character references to normal text | ||||||||
| ||||||||
| ||||||||
add an <?xml version="1.0"?> processing instruction if it's not already there | ||||||||
| ||||||||
add an encoding spec to the <?xml version="1.0"?> processing instruction | ||||||||
| ||||||||
add an XHTML strict doctype declaration to a document add an XHTML transitional doctype declaration to a document add an XHTML frameset doctype declaration to a document add a doctype declaration to a document The arguments are the root element name, the PUBLIC id and the SYSTEM id | ||||||||
| ||||||||
add an XHTML strict doctype declaration to a document | ||||||||
Produced by Haddock version 2.3.0 |