blob: 612c4d8f2fac1ff1800af9f717cbc12833a09787 [file] [log] [blame]
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="Schema">
<s2 title="Disclaimer">
<p>This package contains an implementation of the W3C XML
Schema language. This implementation is experimental. The
<jump href="http://www.w3.org/XML/Group/Schemas.html">XML Schema</jump>
language is still in working draft stage: you
should not consider this implementation complete or correct.
The limitations of this implementation are detailed below.
Please read this document before using this package.</p>
</s2>
<s2 title="Introduction">
<p>This package contains an implementation of a subset of the
W3C XML Schema Language as specified in the 7 April 2000
Working Drafts for <jump
href="http://www.w3.org/TR/xmlschema-1/">Structures</jump> and
<jump
href="http://www.w3.org/TR/xmlschema-2/">Datatypes</jump>. The
parsers contained in this package are able to read and
validate XML documents with the grammar specified in either
DTD or XML Schema format. There is no functionality for
accessing typed data.</p>
<p>We are making this package available in order to get
feedback on the features in the XML Schema language
design and on representing an XML document&apos;s grammar
as part of the document&apos;s DOM tree. We intend to update
this package until it implements all of the functionality
of the then current XML Schema Working Draft. If you are
interested in a particular unimplemented feature, we welcome
your feedback on the &javaparsername; mailing list.</p>
</s2>
<s2 title="Limitations">
<p>The XML Schema implementation in this package is a
subset of the features defined in the 7 April 2000
XML Schema Working Drafts.</p>
</s2>
<s2 title='Components Supported'>
<ul>
<li>Element declarations</li>
<li>Model group definitions: group</li>
<li>Model groups: all, choice, sequence</li>
<li>Attribute declarations</li>
<li>Attribute group definitions</li>
<li>Simple type definitions</li>
<li>Complex type definitions</li>
<li>Wildcards: any</li>
<li>Wildcards: anyAttribute</li>
</ul>
</s2>
<s2 title='Components NOT Supported'>
<ul>
<li>Identity constraints: unique, key, keyref</li>
<li>Notation declaration</li>
<li>Annotation (ignored)</li>
</ul>
</s2>
<s2 title='Features Supported'>
<ul>
<li>Type derivation</li>
<li>Anonymous types</li>
<li>Nested element declaration</li>
<li>Separate symbol spaces for elements, types, groups, and
attribute groups</li>
<li>Equivalency classes</li>
<li>Target namespace</li>
<li>"xsi:schemaLocation" and "xsl:noNamespacesSchemaLocation"</li>
<li>Include</li>
<li>Import</li>
<li>"xsi:type"</li>
</ul>
</s2>
<s2 title='Features NOT Supported'>
<ul>
<li>Constraints in Chapter 5</li>
<li>Nullable</li>
<li>Block</li>
<li>Abstract</li>
</ul>
</s2>
<s2 title='Datatypes Supported'>
<ul>
<li>Built-in simple types (primitive, derived)</li>
<li>Simple type derivation (restriction, list)</li>
<li>Regular expressions</li>
<li>Binary (base64, hex)</li>
<li>Constraining facets</li>
</ul>
</s2>
<s2 title='Datatypes NOT Supported'>
<ul>
<li>Date/time -- ISO8601 (work in progress)</li>
</ul>
</s2>
<s2 title="Other Limitations">
<p>The schema is specified by the xsi:schemaLocation or
xsi:noNamespaceSchemaLocation attribute on the root
element of the document. The xsi prefix must be bound to the
Schema document instance namespace, as specified by the
working draft specification. See the sample provided in the
Usage section.</p>
</s2>
<s2 title="Usage">
<p>In this release, schema validation has been integrated with the
regular SAXParser and DOMParser classes. No special classes are
required to parse documents that use a schema.</p>
<p>Documents that use XML Schema grammars specify the location of the
grammar using an xsi:schemaLocation attribute attached to the root / top-level element
in the document. Here is an example with no target namspace: </p>
<source>&lt;document
xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='document.xsd'&gt;
...
&lt;/document&gt;</source>
<p>Here is an example with a target namespace. Note that it is an
error to specify a different namespace than the target namespace
defined in Schema.</p>
<source>&lt;document
xmlns='NS'
xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
xsi:schemaLocation='NS document.xsd'&gt;
...
&lt;/document&gt;</source>
<p>Review the sample file, 'data/personal.xsd' for an example of an XML
Schema grammar.</p>
</s2>
</s1>