W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2011

Re: <time> values in HTML5

From: Michael Kay <mike@saxonica.com>
Date: Mon, 05 Dec 2011 21:11:10 +0000
Message-ID: <4EDD336E.2050602@saxonica.com>
To: www-xml-schema-comments@w3.org

> It's not hard to define a subtype of xsd:boolean that
> accepts only 'true' and 'false' (or any other subset of the
> lexical space).  It's also not hard to define a union of
> boolean (or of such a subtype) with another type containing
> the other values needed in an enumerated type.
>
What you can't do, however, is define a subtype of boolean that accepts 
the values "✓" and "✗", or a subtype of xs:time that accepts "HH:MM".

We almost got there in XSD 1.1 by recognizing the possibility of adding 
further "pre-lexical facets", and Saxon in fact has an experimental 
extension that allows a user-defined pre-lexical facet to define 
conversions from the value as written into the (abstract) "lexical 
space", and another conversion for the reverse.

Michael Kay
Saxonica
Received on Monday, 5 December 2011 21:11:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 5 December 2011 21:11:40 GMT