This section provides a tutorial example showing that jaxp.SourceValidator does support XSD 1.1.
If you want to validate XML documents that uses an XSD 1.1 schema,
you can try the 2 JAXP sample programs.
jaxp.SourceValidator - Validating an XML document against an XSD schema using JAXP technology.
jaxp.TypeInfoWriter - Writing back elements and attributes with type informaiton using JAXP technology.
Here is how to run jaxp.SourceValidator to get its usage notes:
>jdk8x2r jaxp.SourceValidator -h
usage: java jaxp.SourceValidator (options) ...
options:
-l name Select schema language by name.
-x number Select number of repetitions.
-a uri ... Provide a list of schema documents
-i uri ... Provide a list of instance documents to validate
-vs source Select validation source (sax|dom|stax|stream)
-f |-F Turn on/off Schema full checking.
NOTE: Not supported by all schema factories and validators.
-hs|-HS Turn on/off honouring of all schema locations.
NOTE: Not supported by all schema factories and validators.
-va|-VA Turn on/off validation of schema annotations.
NOTE: Not supported by all schema factories and validators.
-ga|-GA Turn on/off generation of synthetic schema annotations.
NOTE: Not supported by all schema factories and validators.
-m |-M Turn on/off memory usage report
-xsd11 Turn on XSD 1.1 support.
-h This help screen.
defaults:
Schema language: http://www.w3.org/2001/XMLSchema
Repetition: 1
Validation source: sax
Schema full checking: off
Honour all schema locations: off
Validate annotations: off
Generate synthetic annotations: off
Memory: off
Here is my test run of jaxp.SourceValidator on hello_xsd11.xml
>jdk8x2r jaxp.SourceValidator -xsd11 -i hello_xsd11.xml
hello_xsd11.xml: 138 ms
The output confirms that jaxp.SourceValidator supports XSD 1.1.