XML Validation Tag Library
|
[tag libraries]
[tags]
Library | Description |
jelly:validate |
A tag library for validating XML using various schema languages like DTD, XML Schema, Relax NG as well as Relax and TREX. This tag library uses the
JARV
API to perform the validation.By default we use the
MSV
library by Kohsuke Kawaguchi as the implementation of JARV.
|
A tag library for validating XML using various schema languages like DTD, XML Schema, Relax NG as well as Relax and TREX. This tag library uses the
JARV
API to perform the validation.By default we use the
MSV
library by Kohsuke Kawaguchi as the implementation of JARV.
Tag Name | Description |
assertValid | This tag performs an assertion that the tags body contains XMLwhich matches a givem schema validation. This tag is used withJellyUnit to implement an assertion.
|
validate | This tag validates its body using a schema Verifier which canvalidate against DTDs, XML Schema, RelaxNG, Relax or TREX.Any JARV compliant Verifier could be used.The error messages are output as XML events so that they can be styled by the parent tag.
|
verifier | This tag creates a new Verifier of a schema as a variableso that it can be used by a <validate>tag.
|
[tag libraries]
[tags]
This tag performs an assertion that the tags body contains XMLwhich matches a givem schema validation. This tag is used withJellyUnit to implement an assertion.
Attribute Name | Type | Description |
errorHandler | org.xml.sax.ErrorHandler | Sets the SAX ErrorHandler which is used to captureXML validation events.If an ErrorHandler is specifiedthen this tag will output its body and redirect all error messagesto the ErrorHandler.If no ErrorHandler is specified then this tag will just output theerror messages as XML events |
escapeText | boolean |
|
trim | boolean |
|
var | java.lang.String | Sets the name of the variable that will contain a boolean flag for whether ornot the XML is valid. |
verifier | org.iso_relax.verifier.Verifier | Sets the schema Verifier that this tag will use to verify its body |
This tag validates its body using a schema Verifier which canvalidate against DTDs, XML Schema, RelaxNG, Relax or TREX.Any JARV compliant Verifier could be used.The error messages are output as XML events so that they can be styled by the parent tag.
Attribute Name | Type | Description |
errorHandler | org.xml.sax.ErrorHandler | Sets the SAX ErrorHandler which is used to captureXML validation events.If an ErrorHandler is specifiedthen this tag will output its body and redirect all error messagesto the ErrorHandler.If no ErrorHandler is specified then this tag will just output theerror messages as XML events |
escapeText | boolean |
|
trim | boolean |
|
var | java.lang.String | Sets the name of the variable that will contain a boolean flag for whether ornot the XML is valid. |
verifier | org.iso_relax.verifier.Verifier | Sets the schema Verifier that this tag will use to verify its body |
This tag creates a new Verifier of a schema as a variableso that it can be used by a <validate>tag.
Attribute Name | Type | Description |
escapeText | boolean |
|
factory | org.iso_relax.verifier.VerifierFactory | Sets the factory used to create new schema verifier objects.If none is provided then the default MSV factory is used. |
file | java.io.File | Sets the java.io.Fileof the schema to parse. If no URI and no file isspecified then the body of this tag is used as the source of the schema |
systemId | java.lang.String | Sets the system ID used when parsing the schema |
trim | boolean |
|
uri | java.lang.String | Sets the URI of the schema file to parse. If no URI and no file isspecified then the body of this tag is used as the source of the schema |
var | java.lang.String | Sets the name of the variable that will be set to the new Verifier |
|