W3C | Submissions

Team Comment on the XML Schema API Submission

W3C is pleased to receive the XML Schema API Submission from IBM Corporation and X-Hive Corporation B.V.

The XML Schema API allows applications to access:

  1. the representation of the XML Schema Components represented into a set of XML Schema documents, as defined in Schema Component Details ([XML Schema Part 1: Structures], Section 3). This also includes access to the data types, defined in XML Schema Part 2: Datatypes.
  2. the information resulting from the processing of a set of XML Schema documents against an XML document. Applications can therefore access the XML Schema extensions of the XML Information Set (Infoset), called Post-Schema Validation Infoset (PSVI), as defined in "Contributions to the post-schema-validation infoset" ([XML Schema Part 1: Structures], Appendix C.2).

The PSVI interfaces proposed take advantages from an interface listed in the DOM Level 3 Core specification (DOMConfiguration). They can be accessed when manipulating DOM nodes (Element and Attr nodes):

if myElement.isSupported("psvi", "1.0") {
    ElementPSVI myElementPSVI = (ElementPSVI) myElement;
}

or streaming or pull oriented solutions such as SAX or XNI (PSVIProvider):

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         Attributes atts)
                  throws SAXException {
    if (myXMLReader instanceof PSVIProvider) {
        ElementPSVI eltPSVI = ((PSVIProvider) myXMLReader).getElementPSVI();
    }
    //...

Finally, the design on the API follows the path of the DOM API and uses the OMG IDL to remain language and platform neutral.

While DOM Level 3 Core does provide better access than DOM Level 1 or 2 to the properties of the XML Information Set, it does not provide access to the extension defined in the XML Schema specification. Given the wide use of XML Schema, the proposal provides a substantial and useful addition to the DOM API (or other existing event/pull parsing APIs such SAX/XNI). However, the XML Query and XSL Working Groups have been working on extending the work of XML Schema and adding more properties. The XML Schema Working Group is also working on a new version of XML Schema 1.1 (see Requirements for XML Schema 1.1). Therefore, while the proposal addresses today's needs, it should be noted that future extensions will still be needed to follow additions to the XML Architecture. Alternative approaches to the problem of Infoset extensions are possible, each of them having their pros and cons:

Next steps

The submission will be brought to the attention of the XML Schema Working Group, W3C's AC and the community at large.

Past discussions failed to bring consensus around a common solution for an API for XML Schema, and it is not clear that the efforts would gain interest from a significant portion of the XML Schema companies and their users.

Feedback on this technology is encouraged on the xmlschema-dev mailing list (public archive).

Disclaimer: Placing a Submission on a Working Group/Interest Group agenda does not imply endorsement by either the W3C Staff or the participants of the Working Group/Interest Group, nor does it guarantee that the Working Group/Interest Group will agree to take any specific action on a Submission.


Author: Philippe Le Hégaret, DOM Activity Lead,
$Date: 2004/01/22 20:55:59 $