W3C home > Mailing lists > Public > www-tag@w3.org > February 2008

On the context sensitivity of the QName Schema Datatype

From: <noah_mendelsohn@us.ibm.com>
Date: Fri, 15 Feb 2008 15:00:37 -0500
To: connolly@w3.org
Cc: www-tag@w3.org
Message-ID: <OFEA8E369D.6D2F8852-ON852573F0.006CD70C-852573F0.006DD6B1@lotus.com>

Dan, 

On yesterday's TAG call, you said (from the draft minutes at [1]):

"QName is inconsistently defined in Schema -- abc:xyz can denote two 
distinct values at two points in a document, which is not consistent with 
the statement that there is a mapping from lexical to value space."

So, I thought I'd look at the specificaitons From the published working 
draft of Schema 1.1 Datatypes [2]:

"[Definition:]  In this specification, a datatype has three properties:

    * A ·value space·, which is a set of values.
    * A ·lexical space·, which is a set of ·literals· used to denote the 
values.
    * A small collection of functions, relations, and procedures 
associated with the datatype.  Included are equality and order relations 
on the ·value space·, and a ·lexical mapping·, which is a function on the 
·lexical space· onto the ·value space·.

[...]

For some datatypes, notably QName and NOTATION, the mapping from lexical 
representations to values is context-dependent..."

So, while you (or maybe I) might prefer that the design were different, I 
don't think it's fair to imply that the Recommendation is contradictory. 
It makes quite clear that context-dependent lexical mappings are allowed.

By the way, the treatment in Schema 1.0 is different, though I think it 
would be fairer to say that it's loose or underspecified than that it's 
contradictory.  From [3]:

"[Definition:]  A lexical space is the set of valid literals for a 
datatype. "

Pretty broad, but I don't think the definition of QName is inconsistent 
with that.  The definition of QName found there is:

"3.2.18 QName

[Definition:]   QName represents XML qualified names. The ·value space· of 
QName is the set of tuples {namespace name, local part}, where namespace 
name is an anyURI and local part is an NCName. The ·lexical space· of 
QName is the set of strings that ·match· the QName production of 
[Namespaces in XML].

Note:  The mapping between literals in the ·lexical space· and values in 
the ·value space· of QName requires a namespace declaration to be in scope 
for the context in which QName is used. "

Again, I don't think there's anything that implies context independence 
for the mapping from lexical to value in general, and the Recommendation 
is very clear that it's context-dependent for types like QName.

Noah

[1] http://www.w3.org/2008/02/14-tagmem-minutes.html#item01
[2] http://www.w3.org/TR/xmlschema11-2/#datatype
[3] http://www.w3.org/TR/xmlschema-2/#lexical-space

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------
Received on Friday, 15 February 2008 20:00:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:52 GMT