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

Portability | portable
Stability | experimental
Maintainer | Uwe Schmidt (uwe@fh-wedel.de)
Safe Haskell | None

Text.XML.HXT.DTDValidation.IdValidation

Description

This module provides functions for checking special IDIDREFIDREFS constraints.

Checking special ID/IDREF/IDREFS constraints means:

- checking that all ID values are unique.
- checking that all IDREF/IDREFS values match the value of some ID attribute

ID-Validation should be started before or after validating the document.

First all nodes with ID attributes are collected from the document, then it is validated that values of ID attributes do not occure more than once. During a second iteration over the document it is validated that there exists an ID attribute value for IDREF/IDREFS attribute values.

Synopsis

- validateIds :: XmlTree -> XmlArrow

# Documentation

validateIds :: XmlTree -> XmlArrow Source

Perform the validation of the IDIDREFIDREFS constraints.

- 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