A RESTful browser for eXist Java-Based Function Modules


http://exist-db.org/xquery/validation
A module for XML validation and grammars functions.

validation:clear-grammar-cache() xs:integer
Remove all cached grammers.

Returns the number of deleted grammars.

validation:jaxp($instance as item(), $cache-grammars as xs:boolean) xs:boolean
Validate document by parsing $instance. Optionally grammar caching can be enabled. Supported grammars types are '.xsd' and '.dtd'.
$instanceThe document referenced as xs:anyURI, a node (element or result of fn:doc()) or as a Java file object.
$cache-grammarsSet the flag to true() to enable grammar caching.

Returns true() if the document is valid and no single problem occured, false() for all other conditions. For detailed validation information use the corresponding -report() function.

validation:jaxp($instance as item(), $cache-grammars as xs:boolean, $catalogs as item()*) xs:boolean
Validate document by parsing $instance. Optionally grammar caching can be enabled and an XML catalog can be specified. Supported grammars types are '.xsd' and '.dtd'.
$instanceThe document referenced as xs:anyURI, a node (element or result of fn:doc()) or as a Java file object.
$cache-grammarsSet the flag to true() to enable grammar caching.
$catalogsThe catalogs referenced as xs:anyURI's.

Returns true() if the document is valid and no single problem occured, false() for all other conditions. For detailed validation information use the corresponding -report() function.

validation:jaxp-parse($instance as item(), $enable-grammar-cache as xs:boolean, $catalogs as item()*) node()
Parse document in validating mode, all defaults are filled in according to the grammar (xsd).
$instanceThe document referenced as xs:anyURI, a node (element or result of fn:doc()) or as a Java file object.
$enable-grammar-cacheSet the flag to true() to enable grammar caching.
$catalogsThe catalogs referenced as xs:anyURI's.

Returns the parsed document.

validation:jaxp-report($instance as item(), $enable-grammar-cache as xs:boolean) node()
Validate document by parsing $instance. Optionally grammar caching can be enabled. Supported grammars types are '.xsd' and '.dtd'. An XML report is returned.
$instanceThe document referenced as xs:anyURI, a node (element or result of fn:doc()) or as a Java file object.
$enable-grammar-cacheSet the flag to true() to enable grammar caching.

Returns a validation report.

validation:jaxp-report($instance as item(), $enable-grammar-cache as xs:boolean, $catalogs as item()*) node()
Validate document by parsing $instance. Optionally grammar caching can be enabled and an XML catalog can be specified. Supported grammars types are '.xsd' and '.dtd'. An XML report is returned.
$instanceThe document referenced as xs:anyURI, a node (element or result of fn:doc()) or as a Java file object.
$enable-grammar-cacheSet the flag to true() to enable grammar caching.
$catalogsThe catalogs referenced as xs:anyURI's.

Returns a validation report.

validation:jaxv($instance as item(), $grammars as item()+) xs:boolean
Validate document specified by $instance using the schemas in $grammars. Based on functionality provided by 'javax.xml.validation.Validator'. Only '.xsd' grammars are supported.
$instanceThe document referenced as xs:anyURI, a node (element or returned by fn:doc()) or as a Java file object.
$grammarsOne of more XML Schema documents (.xsd), referenced as xs:anyURI, a node (element or returned by fn:doc()) or as Java file objects.

Returns true() if the document is valid and no single problem occured, false() for all other conditions. For detailed validation information use the corresponding -report() function.

validation:jaxv-report($instance as item(), $grammars as item()+) node()
Validate document specified by $instance using the schemas in $grammars. Based on functionality provided by 'javax.xml.validation.Validator'. Only '.xsd' grammars are supported. An XML report is returned.
$instanceThe document referenced as xs:anyURI, a node (element or returned by fn:doc()) or as a Java file object.
$grammarsOne of more XML Schema documents (.xsd), referenced as xs:anyURI, a node (element or returned by fn:doc()) or as Java file objects.

Returns a validation report.

validation:jing($instance as item(), $grammar as item()) xs:boolean
Validate document using 'Jing'. Supported grammar documents extensions are ".xsd" ".rng" ".rnc" ".sch" and ".nvdl". Based on functionality provided by 'com.thaiopensource.validate.ValidationDriver'.
$instanceThe document referenced as xs:anyURI, a node (element or returned by fn:doc()) or as a Java file object.
$grammarThe grammar document as node (element of returned by fn:doc()), xs:anyURI, returned by util:binary-doc() or as a Java file object.

Returns true() if the document is valid and no single problem occured, false() for all other conditions. For detailed validation information use the corresponding -report() function.

validation:jing-report($instance as item(), $grammar as item()) node()
Validate document using 'Jing'. Supported grammar documents extensions are ".xsd" ".rng" ".rnc" ".sch" and ".nvdl". Based on functionality provided by 'com.thaiopensource.validate.ValidationDriver'. An XML report is returned.
$instanceThe document referenced as xs:anyURI, a node (element or returned by fn:doc()) or as a Java file object.
$grammarThe grammar document as node (element of returned by fn:doc()), xs:anyURI, returned by util:binary-doc() or as a Java file object.

Returns a validation report.

validation:pre-parse-grammar($grammar as xs:anyURI*) xs:string*
Pre parse grammars and add to grammar cache. Only XML schemas (.xsd) are supported.
$grammarReference to grammar.

Returns sequence of namespaces of preparsed grammars.

validation:show-grammar-cache() node()
Show all cached grammars.

Returns an XML document containing details on all cached grammars.

validation:validate($instance as item()) xs:boolean
Validate xml. The grammar files (DTD, XML Schema) are resolved using the global catalog file(s).
$instanceThe document referenced as xs:anyURI or a node (element or returned by fn:doc())

Returns true() if the document is valid and no single problem occured, false() for all other conditions. For detailed validation information use the corresponding -report() function.

Deprecated: Use the validation:parse(), validation:jaxv() or valation:jing() functions. This function could be removed at anytime during the 1.5 development and will be removed in the 1.6 release.

validation:validate($instance as item(), $grammar as xs:anyURI) node()
Validate document by using a specific grammar.
$instanceThe document referenced as xs:anyURI or a node (element or returned by fn:doc())
$grammarThe reference to an OASIS catalog file (.xml), a collection (path ends with '/') or a grammar document. Supported grammar documents extensions are ".dtd" ".xsd" ".rng" ".rnc" ".sch" and ".nvdl".

Returns true() if the document is valid and no single problem occured, false() for all other conditions. For detailed validation information use the corresponding -report() function.

Deprecated: Use the validation:parse(), validation:jaxv() or valation:jing() functions. This function could be removed at anytime during the 1.5 development and will be removed in the 1.6 release.

validation:validate-report($instance as item()) node()
Validate xml. The grammar files (DTD, XML Schema) are resolved using the global catalog file(s). An xml report is returned.
$instanceThe document referenced as xs:anyURI or a node (element or returned by fn:doc())

Returns a validation report.

Deprecated: Use the validation:parse-report(), validation:jaxv-report() or valation:jing-report() functions. This function could be removed at anytime during the 1.5 development and will be removed in the 1.6 release.

validation:validate-report($instance as item(), $grammar as xs:anyURI) node()
Validate document by using a specific grammar. An xml report is returned.
$instanceThe document referenced as xs:anyURI or a node (element or returned by fn:doc())
$grammarThe reference to an OASIS catalog file (.xml), a collection (path ends with '/') or a grammar document. Supported grammar documents extensions are ".dtd" ".xsd" ".rng" ".rnc" ".sch" and ".nvdl".

Returns a validation report.

Deprecated: Use the validation:parse-report(), validation:jaxv-report() or valation:jing-report() functions. This function could be removed at anytime during the 1.5 development and will be removed in the 1.6 release.
Return to list of all modules