Re: Unions: canonical lexical representation

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.

--------------------------------------
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:20:27 UTC