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:
- Whitespace within start and end tags is normalized
- Special characters in attribute values and character content are
replaced by character references