W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2003

RE: Unions: canonical lexical representation

From: Alessandro Triglia <sandro@mclink.it>
Date: Thu, 20 Nov 2003 17:49:45 -0500
To: <noah_mendelsohn@us.ibm.com>, "[Public XML Schema-DEV]" <xmlschema-dev@w3.org>, "[XML Schema Comments]" <www-xml-schema-comments@w3.org>
Message-ID: <002801c3afb8$9ee44870$7d01a8c0@aldebaran>



Noah wrote:
> 
> There are others more expert in this than I, but wouldn't the 
> same be true 
> of an integer declared with 
> 
>         <xsd:pattern value="0\d"/>
> 
> in other words, an integer with required leading zero?  There is no 
> canonical form of any value in the value space of this type, 
> which is a 
> known result of the fact that schema allows potentially 
> constraints in the 
> lexical domain.  I don't think you need a union to see this effect.


This is a similar problem, but not quite the same as in my example.  In my
example, I was not constraining the lexical representation (at least
explicitly).  

Anyway, the problem, in both cases, is that there are values of certain
datatypes that can be represented in lexical representation but cannot be
represented in canonical lexical representation.  In my example, it was a
subset of the values, in your example, it is all of them.   This situation
may occur when adding a pattern facet, or when building a union, or...

Please note that my previous email intended to raise the issue in relation
to PSVI contributions.  Whenever a value V of a datatype D *can* be
represented in (non-canonical) lexical representation but *cannot* be
represented in canonical lexical representation, certain contributions to
the PSVI (say, the one for default attributes) will be either impossible or
wrong.

Alessandro


> 
> --------------------------------------
> Noah Mendelsohn 
> IBM Corporation
> One Rogers Street
> Cambridge, MA 02142
> 1-617-693-4036
> --------------------------------------
> 
> 
> 
> 
> 
> 
> 
> 
> "Alessandro Triglia" <sandro@mclink.it>
> Sent by: www-xml-schema-comments-request@w3.org
> 11/10/2003 05:16 PM
> 
>  
>         To:     "[Public XML Schema-DEV]" 
> <xmlschema-dev@w3.org>, "[XML Schema Comments]" 
> <www-xml-schema-comments@w3.org>
>         cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
>         Subject:        Unions: canonical lexical representation
> 
> 
> 
> Hi
> 
> Suppose you have a union whose members are:
> 
> - a restriction of xsd:string with a length facet = 1
> - xsd:integer
> 
> Suppose the union is used as the type definition of an attribute 
> declaration with default = "01"
> 
> This "01" does not match the first member of the union but 
> matches the 
> second member.  Therefore it is the lexical representation of an 
> xsd:integer.  But its canonical lexical representation will 
> be "1".  "1" 
> (and not "01") will be added to the PSVI as the value of a missing 
> attribute i.i. corresponding to that attribute declaration.
> 
> I would accept the statement that the attribute declaration 
> *component* 
> has a correct value for the default property ("the integer 
> 1"), but when 
> this value is written into the PSVI, the result will be wrong.
> 
> Alessandro Triglia
> OSS Nokalva
> 
> 
> 
> 
> 
> 
Received on Thursday, 20 November 2003 17:50:15 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:03 UTC