hxt-relaxng-9.1.4: The HXT RelaxNG validator

Text.XML.HXT.RelaxNG.Validator

Description

This module exports the core functions from the basic validation und simplification libraries. It also exports some helper functions for easier access to the validation functionality.

Synopsis

Documentation

validateDocumentWithRelaxSchema :: SysConfigList -> String -> IOStateArrow s XmlTree XmlTreeSource

validate a document with a Relax NG schema

  • 1.parameter : the system configuration option list for validation
  • 2.parameter : the URI of the Relax NG Schema
  • arrow-input : the document to be validated, namespaces must have been processed
  • arrow-output : the input document, or in case of validation errors, an empty document with status information in the root

configuration options evaluated by validateDocumentWithRelaxSchema:

  • withRelaxCheckRestr : check Relax NG schema restrictions when simplifying the schema (default: on)
  • withRelaxValidateExtRef : validate a Relax NG schema referenced by a externalRef-Pattern (default: on)
  • withRelaxValidateInclude : validate a Relax NG schema referenced by a include-Pattern (default: on)

example:

 validateDocumentWithRelaxSchema [withRelaxCheckRestr yes, withRelaxValidateExtRef no] "testSchema.rng"

validateDocumentWithRelax :: XmlTree -> IOSArrow XmlTree XmlTreeSource

validate an XML document with respect to a Relax NG schema

  • 1.parameter : the valid and simplified schema as XML tree
  • arrow-input : the document to be validated
  • arrow-output : the validated and unchanged document or the empty document with status information set in the root node

validateWithSpezification :: String -> String -> IOSArrow XmlTree XmlTreeSource

Document validation

Validates a xml document with respect to a Relax NG schema

  • 1.parameter : XML document
  • 2.parameter : Relax NG schema file

validateSchemaWithSpezification :: String -> IOSArrow XmlTree XmlTreeSource

Relax NG schema validation

see validateSchemaWithRelax and validateWithSpezification

  • 1.parameter : Relax NG schema file
  • arrow-input : Relax NG Specification in simple form