Documentation

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.

apply an arrow to the input and convert the resulting XML trees into an XML escaped string

This is a save variant for converting a tree into an XML string representation
that is parsable with Text.XML.HXT.Arrow.ReadDocument.
It is implemented with xshow,
but xshow does no XML escaping. The XML escaping is done with
Text.XML.HXT.Arrow.Edit.escapeXmlDoc before xshow is applied.

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