hxt-9.3.1.12: 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
LanguageHaskell98

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

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