| hxt-8.5.4: A collection of tools for processing XML with Haskell. | Source code | Contents | Index
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
validateDocumentWithRelaxSchema :: Attributes -> String -> IOStateArrow s XmlTree XmlTree
validateDocumentWithRelax :: XmlTree -> IOSArrow XmlTree XmlTree
validate :: Attributes -> String -> String -> IOSArrow n XmlTree
validateSchema :: Attributes -> String -> IOSArrow n XmlTree
validateWithSpezification :: Attributes -> String -> String -> IOSArrow XmlTree XmlTree
validateSchemaWithSpezification :: Attributes -> String -> IOSArrow XmlTree XmlTree
validateWithoutSpezification :: Attributes -> String -> String -> IOSArrow n XmlTree
module Text.XML.HXT.RelaxNG.Validation
module Text.XML.HXT.RelaxNG.Simplification
Documentation
validateDocumentWithRelaxSchema :: Attributes -> String -> IOStateArrow s XmlTree XmlTree | Source
validate a document with a Relax NG schema 1.parameter : the 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 options evaluated by validateDocumentWithRelaxSchema: `a_check_restrictions` : check Relax NG schema restrictions when simplifying the schema (default: on) `a_validate_externalRef` : validate a Relax NG schema referenced by a externalRef-Pattern (default: on) `a_validate_include` : validate a Relax NG schema referenced by a include-Pattern (default: on) all other options are propagated to the read functions for schema input example:
     validateDocumentWithRelaxSchema [(a_check_restrictions, "0")] "testSchema.rng"
validateDocumentWithRelax :: XmlTree -> IOSArrow XmlTree XmlTree | Source
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
validate :: Attributes -> String -> String -> IOSArrow n XmlTree | Source
normalize a document for Relax NG validation, call the `validateRelax` function for doing the hard work, and issue errors 1.parameter : the arrow for computing the schema arrow-input : the document to be validated arrow-output : nothing Document validation Validates a xml document with respect to a Relax NG schema. First, the schema is validated with respect to the Relax NG Spezification. If no error is found, the xml document is validated with respect to the schema. 1.parameter : list of options; namespace progagation is always done 2.parameter : XML document 3.parameter : Relax NG schema file available options: `a_do_not_check_restrictions` : do not check Relax NG schema restrictions (includes do-not-validate-externalRef, do-not-validate-include) `a_do_not_validate_externalRef` : do not validate a Relax NG schema referenced by a externalRef-Pattern `a_validate_externalRef` : validate a Relax NG schema referenced by a externalRef-Pattern (default) `a_do_not_validate_include` : do not validate a Relax NG schema referenced by a include-Pattern `a_validate_include` : validate a Relax NG schema referenced by a include-Pattern (default) `a_output_changes` : output Pattern transformations in case of an error `a_do_not_collect_errors` : stop Relax NG simplification after the first error has occurred all Text.XML.HXT.Arrow.ReadDocument.readDocument options example:
     validate [(a_do_not_check_restrictions, "1")] "test.xml" "testSchema.rng"
validateSchema :: Attributes -> String -> IOSArrow n XmlTree | Source
Relax NG schema validation Validates a Relax NG schema with respect to the Relax NG Spezification. 1.parameter : list of available options (see also: `validate`) 2.parameter : Relax NG schema file
validateWithSpezification :: Attributes -> String -> String -> IOSArrow XmlTree XmlTree | Source
Document validation Validates a xml document with respect to a Relax NG schema. Similar to `validate`, but the Relax NG Specification is not created. Can be used, to check a list of documents more efficiently. 1.parameter : list of available options (see also: `validate`) 2.parameter : XML document 3.parameter : Relax NG schema file arrow-input : Relax NG Specification in simple form example:
     Text.XML.HXT.RelaxNG.Schema.relaxSchemaArrow
     >>>
     ( validateWithSpezification [] "foo.xml" "foo.rng"
       &&&
       validateWithSpezification [] "bar.xml" "bar.rng"
     )
validateSchemaWithSpezification :: Attributes -> String -> IOSArrow XmlTree XmlTree | Source
Relax NG schema validation see `validateSchema` and `validateWithSpezification` 1.parameter : list of available options (see also: `validate`) 2.parameter : Relax NG schema file arrow-input : Relax NG Specification in simple form
validateWithoutSpezification :: Attributes -> String -> String -> IOSArrow n XmlTree | Source
Document validation Validates a xml document with respect to a Relax NG schema, but the schema is `not` validated with respect to a specification first. Should be used only for valid Relax NG schemes. 1.parameter : list of available options (see also: `validate`) 2.parameter : XML document 3.parameter : Relax NG schema file
module Text.XML.HXT.RelaxNG.Validation
module Text.XML.HXT.RelaxNG.Simplification
Produced by Haddock version 2.4.2