[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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>
VC-Filter
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
compared.

The stylesheet can be downloaded from

   http://www.blackmesatech.com/2009/04/xsd.vc.xsl

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

   http://www.blackmesatech.com/2009/04/vc.html

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
system.

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

   http://www.blackmesatech.com/2009/04/vcdoc.html

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 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.