Text.XML.HXT.DTDValidation.AttributeValueValidation

hxt-9.3.1.16: A collection of tools for processing XML with Haskell.

Copyright | Copyright (C) 2008 Uwe Schmidt
License | MIT
Maintainer | Uwe Schmidt (uwe@fh-wedel.de)
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell98

Text.XML.HXT.DTDValidation.AttributeValueValidation

Description

This module provides functions for validating attributes.

The main functions are:

- Check if the attribute value meets the lexical constraints of its type
- Normalization of an attribute value

Synopsis

- checkAttributeValue :: XmlTrees -> XmlTree -> XmlArrow
- normalizeAttributeValue :: Maybe XmlTree -> String -> String

# Documentation

checkAttributeValue :: XmlTrees -> XmlTree -> XmlArrow #

Checks if the attribute value meets the lexical constraints of its type.

- 1.parameter dtdPart : the children of the `DOCTYPE` node
- 2.parameter attrDecl : the declaration of the attribute from the DTD
- returns : a function which takes an element (XTag or XDTD ATTLIST), checks if the attribute value meets the lexical constraints of its type and returns a list of errors

normalizeAttributeValue :: Maybe XmlTree -> String -> String #

Normalizes an attribute value with respect to its type. (3.3.3 / p.29 in Spec)

- 1.parameter attrDecl : the declaration of the attribute from the DTD. Expected is a list. If the list is empty, no declaration exists.
- 2.parameter value : the attribute value to be normalized
- returns : the normalized value