hxt-9.3.1.21: A collection of tools for processing XML with Haskell.
CopyrightCopyright (C) 2008 Uwe Schmidt
LicenseMIT
MaintainerUwe Schmidt (uwe@fh-wedel.de)
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Text.XML.HXT.DTDValidation.DocTransformation

Description

This module provides functions for transforming XML documents represented as XmlTree with respect to its DTD.

Transforming an XML document with respect to its DTD means:

  • add all attributes with default values
  • normalize all attribute values
  • sort all attributes in lexical order

Note: Transformation should be started after validation.

Before the document is validated, a lookup-table is build on the basis of the DTD which maps element names to their transformation functions. After this initialization phase the whole document is traversed in preorder and every element is transformed by the XmlFilter from the lookup-table.

Synopsis

Documentation

transform :: XmlTree -> XmlArrow Source #

filter for transforming the document.

  • 1.parameter dtdPart : the DTD subset (Node DOCTYPE) of the XmlTree
  • 2.parameter doc : the document subset of the XmlTree
  • returns : a list of errors