Release Info


API JavaDoc


XNI Manual
XML Schema

Source Repository
User Mail Archive
Dev Mail Archive


This package contains the implementations of the W3C XML Schema 1.0 and 1.1 Languages, that are recommendation of the Worldwide Web Consortium. The XML Schema 1.0 Language is available in three parts: XML Schema: Primer and XML Schema: Structures and XML Schema: Datatypes. The XML Schema 1.1 Language is available in two parts: Structures and Datatypes. In this document we discuss our interpretation of the specifications where it seems to us particularly likely that others might arrive at a different interpretation. We consider this implementation to be complete except for the limitations cited within this document. The implementation has been extensively tested and known problem areas are set out within this document. Please read this document before using this package.

Xerces-J's compliance to W3C XML Schema test suite

Following are Xerces-J's compliance reports for the W3C XML Schema test suite:

XML Schema Programmer's Guide

This section provides the following topics:

Supported XML Schema 1.1 Features
  • All Groups
    • maxOccurs may now be >1
    • Wildcards are now allowed
    • Derivation by extension
    • xs:group is allowed as a child of xs:all
  • Assertions
  • Conditional Type Assignment
  • Simplified Complex Type restriction rules (also known as Subsumption)
  • Open Content and Default Open Content
  • Default attribute group
  • Target namespace on local element/attribute declarations
  • Element declarations allowed in more than one substitution group
  • Wildcards
    • not namespace
    • not QName
    • not #defined
    • not #definedSibling
    • Relaxation of UPA in the presence of wildcards
  • Overriding component definitions (xs:override)
  • Conditional Inclusion
    • vc:minVersion
    • vc:maxVersion
    • vc:typeAvailable
    • vc:typeUnavailable
    • vc:facetAvailable
    • vc:facetUnavailable
  • Context property for local simple/complex type definitions
  • explicitTimezone facet and dateTimeStamp derived type
  • yearMonthDuration and dayTimeDuration derived types
  • precisionDecimal type
  • Union types not expanded
    • Lists of ID
    • Unions involving ID
    • Multiple attributes of type ID
    • Default values of type IDREF
    • Default values for elements or attributes of type ID

  • Length, minLength, and maxLength facets are limited to the value 2147483647. Items larger than this limit will not be validated correctly.
  • The values of minOccurs and maxOccurs attributes are limited to the value 2147483647. Items larger than this limit will not be validated correctly.
  • The values of minimum and maximum quantifiers in the pattern regular expressions are limited to the value 2147483647. Items larger than this limit will not be validated correctly.
  • The absolute values of the fraction portion of the second values in date/time datatypes are limited to the value 2147483647. Items larger than this limit will not be validated correctly. i.e. 11.2147483648 is not supported as a second value.
  • Leap seconds are not supported in the values of date/time datatypes.

Problem Areas/Known Bugs
  • For larger values of maxOccurs, an OutOfMemoryError may occur. The workaround for this problem, if your application permits it, is to change the maxOccurs value to unbounded. If you are unable to change the schema you can configure Xerces-J so that it fails more gracefully by enabling the JAXP secure processing feature. See the Javadoc for javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING for more details.

Other Notes
  • As of version 2.2.1, it is hoped that Xerces-J will always be able to parse the Schema for Schemas current at the time of the product's release. As of version 2.2.1, this implies inserting special logic to permit the presence of the built-in Schema datatypes in this particular schema; an issue has been raised with the Schema Working Group, in hopes the document will be modified so that the built-in types are no longer presented as global components. Thus, anyone planning to rely on the Schema for Schemas should be aware that the possibility exists that a change of this sort might be made in the future.
  • In the original XML Schema recommendation, the lexical space of the simple type gMonth is --MM--. An erratum E2-12 changed that to --MM. For compatibility reasons, Xerces currently supports both forms. To align with the recommendation, we have decided to deprecate the old form, and plan to discontinue support for that form in a future release.

Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.