W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2009

VC-Filter, a demonstrator for the XSD vc:* attributes (was Re: [XML Schema 1.1] Is vc:facetAvailable only an attribute of xs:element? (Not an attribute of xs:simpleType?))

From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
Date: Mon, 4 May 2009 17:11:33 -0600
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-Id: <6E93FC44-29CD-4CC6-B106-E1146C284187@blackmesatech.com>
To: "Costello, Roger L." <costello@mitre.org>
On 30 Apr 2009, at 09:36 , Costello, Roger L. wrote:

> Is xs:facetAvailable and xs:facetUnavailable only an attribute of  
> xs:element? e.g.
> <element name="start-time" vc:facetAvailable="xs:assert">
>   ...
> </element>
> Or, can they be an attribute of xs:simpleType? e.g.
> <simpleType name="documentType" vc:facetAvailable="xs:assert">
>   ...
> </simpleType>
> The schema-for-schemas (Appendix A) doesn't seem to define any of  
> the VC stuff. Neither does the DTD-for-schemas (Appendix L)

I think Michael Kay has already answered your main questions here:
the vc:* attributes can appear anywhere and are used to filter
the schema document before the schema document is checked against
the schema for schema documents.

Your questions on the subject of the version-control attributes
have prompted me to put together a simple implementation of the
vc:* version-control mechanism, in the form of an XSLT stylesheet
which takes an XML document as input, performs the filtering
required by the XSD spec, and writes the filtered document as its
result.  Parameters can be passed to set the version number,
the list of available datatypes, and the list of available
facets, against which the values of the vc:* attributes are

The stylesheet can be downloaded from


The stylesheet can also be invoked on user-supplied input from
the VC-Filter Web page


which allows the user to specify an input document and parameters,
applies the stylesheet, and displays the result.  This may be helpful
for those seeking to understand better how the rules of the vc:*
attributes work.  The XSLT processor in your browser is used to
perform the transform, so your schema document never leaves your

VC-Filter has some gaps and shortcomings, of course; the ones
I'm aware of are noted in the documentation at


I hope this is useful and/or diverting to those interested in
XSD 1.1.

* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
Received on Monday, 4 May 2009 23:12:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:51 UTC