Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Applying enumeration-facet on list type

From: "Michael Kay" <mike@--------.--->
To: "'Eran Balter'" <E.Balter@--.--->, <xmlschema-dev@--.--->
Date: 2/7/2008 1:49:00 PM
I'm 99% sure that it's intended to be legal. Schema Part 2 states the
intention clearly:

4.3.5 enumeration


[Definition:]   enumeration constrains the
<http://www.w3.org/TR/xmlschema-2/#dt-value-space> .value space. to a
specified set of values. 

There is however a minor bug in the spec; it says that when going from the
XML representation of the schema to the component representation, the
"actual value" of the enumeration/@value attribute is used, and the
definition of "actual value" suggests that the enumerated value "1.0 2" is
interpreted as an instance of xs:anySimpleType (because that's the type of
@value as defined in the schema for schemas), rather than as an instance of
the type whose facet is being defined.

Until fairly recently, unfortunately, Saxon implemented what the spec says,
not what it obviously meant to say.

Michael Kay

http://www.saxonica.com/ 


  _____  

From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...] On
Behalf Of Eran Balter
Sent: 07 February 2008 09:10
To: xmlschema-dev@w...
Subject: Applying enumeration-facet on list type



Hi,

 

When defining an enumeration-facet on a list, should we consider the
lexical-space or value-space of the value? 

Is the following example legal?

 

Instance: 

<root MyAtt="1.0 2.0"/> 

 

Schema:

<?xml version="1.0" ?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

            <xsd:element name="root">

                <xsd:complexType>

                        <xsd:attribute name="MyAtt">

                                    <xsd:simpleType>

                                    <xsd:restriction>

                                                <xsd:simpleType>

                                                   <xsd:list
itemType="xsd:decimal" />

                                                </xsd:simpleType>

                                    <xsd:enumeration value='1.0 2'/> 

                                    </xsd:restriction>

                                    </xsd:simpleType>

                        </xsd:attribute>

                </xsd:complexType>

            </xsd:element>

</xsd:schema>



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent