http://www.w3.org/2007/XMLSchema-versioning
27 August 2007
The URI http://www.w3.org/2007/XMLSchema-versioning
identifies a namespace
used for two attributes in the XSDL 1.1 specification,
namely minVersion
and maxVefrsion
.
This document describes the XML Schema Versioning namespace and provides links to related resources, using Resource Directory Description Language.
The basic idea of the attributes is simple: before an XSDL processor does anything else with a schema document, it performs a pre-processing step that executes a simple algorithm for conditional inclusion and exclusion of the elements in the document.
xs:decimal
.
Call this number V (for ‘version number’).
minVersion
or maxVersion
in the
namespace http://www.w3.org/2007/XMLSchema-versioning
.minVersion
,
or greater than maxVersion
, then the element is excluded from
the schema document, including all its descendants, before further processing
is done.
Schema authors can use this to provide alternative formulations of some constructs, using idioms like the following:
<schema ... xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"> <complexType name="T" vc:maxVersion="1.1"> ... definition for version 1.0 and 1.1 processors ... </complexType> <complexType name="T" vc:maxVersion="1.2"> ... definition for 1.2 and later processors ... </complexType> </schema>
In this way, schemas can use constructs from newer versions of XML Schema even while the set of actually deployed schema processors is a mixture of those which support the new constructs and those which do not support them.
For a fuller normative description, see section 4.2.1 Conditional Inclusion of XSDL 1.1 Part 1: Structures.
XSDL 1.0 does not require schema processors to support this
namespace or the minVersion
and maxVersion
attributes. However, the spec says explicitly that the infoset used as
a schema document does not necessarily come directly from parsing an
XML document but may be a ‘synthetic infoset’, the output of
some other process.
It is thus quite clear that a conforming XSDL 1.0 processor can implement this mechanism, to allow schema authors to write schema documents usable both with XSDL 1.0 processors and with 1.1 processors.
The XML Schema Working Group or others may publish a note on this topic; at the moment, however, no such note has been published.
Users of the namespace documented here should be aware, as a matter of namespace policy, that more names in this namespace may be given definitions in future versions of the XSDL specification, or in other specifications. You should not assume that the namespace has no meaningful names other than those defined at this point.