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

Re: primitive datatypes in XML schema 1.0 versus 1.1

From: C. M. Sperberg-McQueen <cmsmcq@acm.org>
Date: Tue, 23 Oct 2007 09:52:20 -0600
Message-Id: <14333F5F-0D58-4F0D-AD33-A6F3663BF230@acm.org>
Cc: "C. M. Sperberg-McQueen" <cmsmcq@acm.org>, www-xml-schema-comments@w3.org
To: Jos de Bruijn <debruijn@inf.unibz.it>


On 5 Sep 2007, at 02:20 , Jos de Bruijn wrote:

> Dear XML schema working group,
>
> I am a member of the W3C Rule Interchange Format (RIF) working group.
> As the name of the working group indicates, we are developing an
> interchange format for rules over the Web.
> For datatype support we chose to rely on XML schema primitive  
> datatypes.
> The question now is whether we should use XML schema 1.0 or 1.1.
>
> I have seen that the string datatype in 1.1 is a strict superset of  
> the
> string datatype in 1.0: every string in 1.0 is a string in 1.1, but
> there are strings in 1.1 which are not strings in 1.0.
> Is there some exhaustive list with the differences of the primitive
> datatypes in the versions 1.0 and 1.1 of XML schema?

I think you may be conflating two distinctions.

In both XSDL 1.0 and XSDL 1.1, the value space of the xs:string
datatype is the set of sequences of legal XML characters.

In XSDL 1.1, the spec explicitly notes that conforming processors
may support either the XML 1.0 or the XML 1.1 definition of legal
XML characters, or both.  In XSDL 1.0, the normative reference is
to XML 1.0, and some readers of the spec argue on that basis that
conforming XSDL 1.0 processors must not follow the XML 1.1 rules
for legal characters.

Analogous issues arise for NCName and any other datatypes which
rely on definitions of key concepts in XML.

Other datatypes which refer normatively or informatively to
other specifications are also described in slightly different terms
in XSDL 1.1.  The anyURI type points to the current RFCs,
instead of the obsolete ones referred to by XSDL 1.0, and 1.1
tries to make a clearer statement about what is and what is not
checked as a matter of type validity.  (In 1.1, that is explicitly
nothing:  any string is accepted as an anyURI value for type
validation purposes; checking against the relevant URI specs
is left to the application.  In 1.0, the XSDL spec refers
vaguely to an RFC which does not provide a crisp definition of
what is and what is not a URI, and it's not perfectly clear
what processors are supposed to do.)  And since the RFCs defining
language codes have changed since 1998, the language type may
(or may not) also have changed (depending on how one reads the
words of XSDL 1.0).

For a detailed list of differences between XML 1.0 and XML 1.1,
I would look in the XML 1.1 spec.  Informally, and without looking
there, I believe there are differences in:

   - the handling of control characters (both in the C0 and
     the C1 ranges) (some characters are now allowed to be
     referred to using numeric character references, which were
     not legal in any form before; others are now legal ONLY
     in the form of numeric character references, which are
     legal in literal form in XML 1.0)
   - the recognition of x0085 (NEL) as a line separator
   - the definition of name and namestart characters

This list is intended to give you an idea of the kinds of changes
involved; it is not an exhaustive or precise list and should not
be read as one.  Readers who need precise information should go to
the XML specs for that information.

> Is there any reason you see why we should choose one version of XML
> schema over the other?

Speaking for myself, I'd say you should use XSDL 1.1 because
unlike XSDL 1.0 it cannot be read as forbidding processors to
support XML 1.1.  It also cleans up some aspects of the spec
which are obscure, underspecified, or contradictory in 1.0,
and it adds useful functionality.

The official position of the XML Schema Working Group, if it
had one, would almost certainly be that you and everyone else
should use whatever W3C specs best meet your needs, which is
just a polite way of dumping the problem back into your lap.

> Thank you in advance for your advice and clarification.

I hope this helps.

--Michael Sperberg-McQueen
   World Wide Web Consortium
Received on Tuesday, 23 October 2007 15:52:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:12 GMT