Installing Xerces2 Java Parser for XSD 1.1

This section provides a quick introduction of Xerces2 and a tutorial of downloading and installing JAR files of Xerces2 Java Parser for XSD 1.1.

What Is Xerces2 Java Parser? Xerces2 Java Parser is an open source Java API of XML parsers. Xerces2 Java Parser supports XML standards, XInclude, DOM, SAX, JAXP, and XML Schema.

The current version of Xerces2 Java Parser is release 2.12.1, which supports the following standards and APIs:

Xerces2 has been included JDK since JDK 1.6 as the default JAXP API implementation. But the one included in JDK is definitely not the latest release of Xerces2. So you have 3 options to use Xerces2 to support XML, XSD and related technologies.

Since the Xerces2 code included in JDK 13 does not support XML Schema (XSD) 1.1, I want to download and install the latest version of Xerces2 to play with XSD 1.1 features. Here is what I did:

1. Go to the Xerces2 Java Parser home page at http://xerces.apache.org/xerces2-j/.

2. Click the link "Download" on the left, then click the "Binary Distributions" link.

3. Click the "Xerces2 Java 2.12.1 (XML Schema 1.1) - zip" link to start the download. Please do not select the regular version. It does not support XSD 1.1.

4. Save the downloaded file, Xerces-J-bin.2.12.1-xml-schema-1.1.zip, to your current working directory.

5. Unzip the downloaded file, Xerces2 JAR and other files will be located in the sub-directory, xerces-2_12_1:

herong> ls -l xerces-2_12_1-xml-schema-1.1/

total 6800
-rw-r--r--@    11560 LICENSE
-rw-r--r--@      436 LICENSE-SAX.html
-rw-r--r--@     5023 LICENSE.DOM-documentation.html
-rw-r--r--@     4167 LICENSE.DOM-software.html
-rw-r--r--@     1149 LICENSE.cupv10k-runtime.txt
-rw-r--r--@     2032 LICENSE.icu4j.html
-rw-r--r--@    12744 LICENSE.org.eclipse.wst.xml.xpath2.processor_1.2.0.html
-rw-r--r--@    11558 LICENSE.resolver.txt
-rw-r--r--@    11558 LICENSE.serializer.txt
-rw-r--r--@     1390 NOTICE
-rw-r--r--@      388 NOTICE.resolver.txt
-rw-r--r--@      864 NOTICE.serializer.txt
-rw-r--r--@     1662 Readme.html
-rw-r--r--@     8980 cupv10k-runtime.jar
drwxr-xr-x@      204 data
drwxr-xr-x@     1666 docs
-rw-r--r--@   519119 icu4j.jar
-rw-r--r--@   559933 org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
-rw-r--r--@    84091 resolver.jar
drwxr-xr-x@      340 samples
-rw-r--r--@   278286 serializer.jar
-rw-r--r--@  1526907 xercesImpl.jar
-rw-r--r--@   175552 xercesSamples.jar
-rw-r--r--@   220536 xml-apis.jar

Xerces2 is ready. See next tutorials on how to use it.

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

 Verify 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 APIs

 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

 Archived Tutorials

 References

 Full Version in PDF/EPUB