| ||||
| ||||
Description | ||||
Namespace filter $Id: NamespaceFilter.hs,v 1.4 20061112 14:53:00 hxml Exp $ Namespaces are processed with two main filter, propagateNamespaces and validateNamespaces. propagateNamespaces takes a XML tree and attaches extra namespace info at every tag name and attribute name. So after processing a tree with propagateNamespaces, the access functions namespaceOf and universalNameOf deliver the associated namespace (or "") for tag names and attribute names. validateNamespaces checks whether names are wellformed related to the XML namespace definition. whether a legal namespace is declared for all prefixes, and whether attribute names are unique related to universal names. | ||||
Synopsis | ||||
Documentation | ||||
type NamespaceTable = NsEnv | ||||
Type for the namespace association list, used when propagating namespaces by modifying the QName values in a tree | ||||
propagateNamespaces :: XmlFilter | ||||
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 propagateNamespaceEnv. The filter may be applied repeatedly if neccessary. | ||||
propagateNamespaceEnv :: NamespaceTable -> XmlFilter | ||||
attaches the namespace info given by the namespace table to a tag node and its attributes and children. | ||||
validateNamespaces :: XmlFilter | ||||
validate the namespace constraints in a whole tree. result is the list of errors concerning namespaces. Work is done by applying validate1Namespaces to all nodes. Predicates isWellformedQName, isWellformedQualifiedName, isDeclaredNamespace and isWellformedNSDecl are applied to the appropriate tags and attributes. | ||||
validate1Namespaces :: XmlFilter | ||||
a single node for namespace constrains. | ||||
isNamespaceDecl :: XmlFilter | ||||
module Text.XML.HXT.DOM.NamespacePredicates | ||||
Produced by Haddock version 2.1.0 |