XSD 1.1 Supported by jaxp.SourceValidator

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.

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.

Last update: 2014.

Table of Contents

 About This Book

 Introduction to XML Schema

 XML Editor and Schema Processor - XMLPad

 Java API for XML Processing - JAXP

 JAXP - XML Schema (XSD) Validation

Xerces2 Java Parser - Java API of XML Parsers

 Installing Xerces2 Java Parser for XSD 1.1

 Verifying Installation of Xerces2

 Xerces2 Sample Program List

 Xerces2 Sample Program dom.Counter

 dom.Counter Validating XML with Associated XSD

 dom.GetElementsByTagName and dom.Writer

 sax.DocumentTracer and sax.Writer

 Examples of XSD and XML Files with Errors

 sax.Writer Reporting Errors Embedded in XML Structure

 XSD 1.1 not Supported by sax.Writer

XSD 1.1 Supported by jaxp.SourceValidator

 Examples of XSD 1.1 and XML Files with Errors

 jaxp.TypeInfoWriter as an XSD 1.1 Validation Tool

 Using Xerces2 Java API

 XML Schema Language - Basics

 Introduction of XSD Built-in Datatypes

 "string" and Its Derived Datatypes

 "decimal" and Its Derived Datatypes

 "dateTime" and Its Related Datatypes

 Miscellaneous Built-in Datatypes

 Facets, Constraining Facets and Restriction Datatypes

 "simpleType" - Defining Your Own Simple Datatypes

 Complex Element Declaration

 Identity-Constraints: unique, key and keyref

 Assertion as Custom Validation Rules

 XML Schema Location and Namespace in XML Documents

 Overriding Element Types in XML Documents

 Linking Multiple Schema Documents Together

 Glossary

 References

 PDF Printing Version