<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Rendered using the Haskell Html Library v0.2--> <HTML ><HEAD ><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" ><TITLE >Text.XML.HXT.RelaxNG.Validator</TITLE ><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css" ><SCRIPT SRC="haddock-util.js" TYPE="text/javascript" ></SCRIPT ><SCRIPT TYPE="text/javascript" >window.onload = function () {setSynopsis("mini_Text-XML-HXT-RelaxNG-Validator.html")};</SCRIPT ></HEAD ><BODY ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="topbar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" " ></TD ><TD CLASS="title" >hxt-8.3.2: A collection of tools for processing XML with Haskell.</TD ><TD CLASS="topbut" ><A HREF="index.html" >Contents</A ></TD ><TD CLASS="topbut" ><A HREF="doc-index.html" >Index</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="modulebar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><FONT SIZE="6" >Text.XML.HXT.RelaxNG.Validator</FONT ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Description</TD ></TR ><TR ><TD CLASS="doc" >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. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Synopsis</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="#v%3AvalidateDocumentWithRelaxSchema" >validateDocumentWithRelaxSchema</A > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow" >IOStateArrow</A > s <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AvalidateDocumentWithRelax" >validateDocumentWithRelax</A > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Avalidate" >validate</A > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > n <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AvalidateSchema" >validateSchema</A > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > n <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AvalidateWithSpezification" >validateWithSpezification</A > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AvalidateSchemaWithSpezification" >validateSchemaWithSpezification</A > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AvalidateWithoutSpezification" >validateWithoutSpezification</A > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > n <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" >module <A HREF="Text-XML-HXT-RelaxNG-Validation.html" >Text.XML.HXT.RelaxNG.Validation</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" >module <A HREF="Text-XML-HXT-RelaxNG-Simplification.html" >Text.XML.HXT.RelaxNG.Simplification</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Documentation</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:validateDocumentWithRelaxSchema" ><A NAME="v%3AvalidateDocumentWithRelaxSchema" ></A ></A ><B >validateDocumentWithRelaxSchema</B > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow" >IOStateArrow</A > s <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >validate a document with a Relax NG schema </P ><UL ><LI > 1.parameter : the option list for validation </LI ><LI > 2.parameter : the URI of the Relax NG Schema </LI ><LI > arrow-input : the document to be validated, namespaces must have been processed </LI ><LI > arrow-output : the input document, or in case of validation errors, an empty document with status information in the root </LI ></UL ><P >options evaluated by validateDocumentWithRelaxSchema: </P ><UL ><LI > <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_check_restrictions" >a_check_restrictions</A ></TT > : check Relax NG schema restrictions when simplifying the schema (default: on) </LI ><LI > <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_validate_externalRef" >a_validate_externalRef</A ></TT > : validate a Relax NG schema referenced by a externalRef-Pattern (default: on) </LI ><LI > <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_validate_include" >a_validate_include</A ></TT > : validate a Relax NG schema referenced by a include-Pattern (default: on) </LI ></UL ><P >all other options are propagated to the read functions for schema input </P ><P >example: </P ><PRE > validateDocumentWithRelaxSchema [(a_check_restrictions, "0")] "testSchema.rng" </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:validateDocumentWithRelax" ><A NAME="v%3AvalidateDocumentWithRelax" ></A ></A ><B >validateDocumentWithRelax</B > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >validate an XML document with respect to a Relax NG schema </P ><UL ><LI > 1.parameter : the valid and simplified schema as XML tree </LI ><LI > arrow-input : the document to be validated </LI ><LI > arrow-output : the validated and unchanged document or the empty document with status information set in the root node </LI ></UL ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:validate" ><A NAME="v%3Avalidate" ></A ></A ><B >validate</B > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > n <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >normalize a document for Relax NG validation, call the <TT ><A HREF="Text-XML-HXT-RelaxNG-Validation.html#v%3AvalidateRelax" >validateRelax</A ></TT > function for doing the hard work, and issue errors </P ><UL ><LI > 1.parameter : the arrow for computing the schema </LI ><LI > arrow-input : the document to be validated </LI ><LI > arrow-output : nothing </LI ></UL ><P >Document validation </P ><P >Validates a xml document with respect to a Relax NG schema. </P ><P >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. </P ><UL ><LI > 1.parameter : list of options; namespace progagation is always done </LI ><LI > 2.parameter : XML document </LI ><LI > 3.parameter : Relax NG schema file </LI ></UL ><P >available options: </P ><UL ><LI > <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_do_not_check_restrictions" >a_do_not_check_restrictions</A ></TT > : do not check Relax NG schema restrictions (includes do-not-validate-externalRef, do-not-validate-include) </LI ><LI > <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_do_not_validate_externalRef" >a_do_not_validate_externalRef</A ></TT > : do not validate a Relax NG schema referenced by a externalRef-Pattern </LI ><LI > <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_validate_externalRef" >a_validate_externalRef</A ></TT > : validate a Relax NG schema referenced by a externalRef-Pattern (default) </LI ><LI > <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_do_not_validate_include" >a_do_not_validate_include</A ></TT > : do not validate a Relax NG schema referenced by a include-Pattern </LI ><LI > <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_validate_include" >a_validate_include</A ></TT > : validate a Relax NG schema referenced by a include-Pattern (default) </LI ><LI > <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_output_changes" >a_output_changes</A ></TT > : output Pattern transformations in case of an error </LI ><LI > <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_do_not_collect_errors" >a_do_not_collect_errors</A ></TT > : stop Relax NG simplification after the first error has occurred </LI ><LI > all Text.XML.HXT.Arrow.ReadDocument.readDocument options </LI ></UL ><P >example: </P ><PRE > validate [(a_do_not_check_restrictions, "1")] "test.xml" "testSchema.rng" </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:validateSchema" ><A NAME="v%3AvalidateSchema" ></A ></A ><B >validateSchema</B > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > n <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >Relax NG schema validation </P ><P >Validates a Relax NG schema with respect to the Relax NG Spezification. </P ><UL ><LI > 1.parameter : list of available options (see also: <TT ><A HREF="Text-XML-HXT-RelaxNG-Validator.html#v%3Avalidate" >validate</A ></TT >) </LI ><LI > 2.parameter : Relax NG schema file </LI ></UL ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:validateWithSpezification" ><A NAME="v%3AvalidateWithSpezification" ></A ></A ><B >validateWithSpezification</B > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >Document validation </P ><P >Validates a xml document with respect to a Relax NG schema. Similar to <TT ><A HREF="Text-XML-HXT-RelaxNG-Validator.html#v%3Avalidate" >validate</A ></TT >, but the Relax NG Specification is not created. Can be used, to check a list of documents more efficiently. </P ><UL ><LI > 1.parameter : list of available options (see also: <TT ><A HREF="Text-XML-HXT-RelaxNG-Validator.html#v%3Avalidate" >validate</A ></TT >) </LI ><LI > 2.parameter : XML document </LI ><LI > 3.parameter : Relax NG schema file </LI ><LI > arrow-input : Relax NG Specification in simple form </LI ></UL ><P >example: </P ><PRE > Text.XML.HXT.RelaxNG.Schema.relaxSchemaArrow >>> ( validateWithSpezification [] "foo.xml" "foo.rng" &&& validateWithSpezification [] "bar.xml" "bar.rng" ) </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:validateSchemaWithSpezification" ><A NAME="v%3AvalidateSchemaWithSpezification" ></A ></A ><B >validateSchemaWithSpezification</B > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A > <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >Relax NG schema validation </P ><P >see <TT ><A HREF="Text-XML-HXT-RelaxNG-Validator.html#v%3AvalidateSchema" >validateSchema</A ></TT > and <TT ><A HREF="Text-XML-HXT-RelaxNG-Validator.html#v%3AvalidateWithSpezification" >validateWithSpezification</A ></TT > </P ><UL ><LI > 1.parameter : list of available options (see also: <TT ><A HREF="Text-XML-HXT-RelaxNG-Validator.html#v%3Avalidate" >validate</A ></TT >) </LI ><LI > 2.parameter : Relax NG schema file </LI ><LI > arrow-input : Relax NG Specification in simple form </LI ></UL ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:validateWithoutSpezification" ><A NAME="v%3AvalidateWithoutSpezification" ></A ></A ><B >validateWithoutSpezification</B > :: <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes" >Attributes</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString" >String</A > -> <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOSArrow" >IOSArrow</A > n <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree" >XmlTree</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >Document validation </P ><P >Validates a xml document with respect to a Relax NG schema, but the schema is <TT >not</TT > validated with respect to a specification first. Should be used only for valid Relax NG schemes. </P ><UL ><LI > 1.parameter : list of available options (see also: <TT ><A HREF="Text-XML-HXT-RelaxNG-Validator.html#v%3Avalidate" >validate</A ></TT >) </LI ><LI > 2.parameter : XML document </LI ><LI > 3.parameter : Relax NG schema file </LI ></UL ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >module <A HREF="Text-XML-HXT-RelaxNG-Validation.html" >Text.XML.HXT.RelaxNG.Validation</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >module <A HREF="Text-XML-HXT-RelaxNG-Simplification.html" >Text.XML.HXT.RelaxNG.Simplification</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="botbar" >Produced by <A HREF="http://www.haskell.org/haddock/" >Haddock</A > version 2.5.0</TD ></TR ></TABLE ></BODY ></HTML >