W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2005

Q: Fixed value constraint validation for elements

From: Khaled Noaman <knoaman@ca.ibm.com>
Date: 12 Apr 2005 18:52:51 -0600
To: www-xml-schema-comments@w3.org
Cc: Sandy Gao <sandygao@ca.ibm.com>
Message-ID: <OFB2CF29E6.0A1127A2-ON85256FC0.0055A906-85256FC0.0057480F@ca.ibm.com>
Hi,

In the schema spec [1] , we have the following rule:

        5.2.2.2.2 If the {content type} of the ·actual type definition· is 
a simple
        type definition, then the ·actual value· of the item must match 
the canonical
        lexical representation of the {value constraint} value.

If I have a schema where element 'e1' is declared as anySimpleType with a 
fixed value of '123', and in my instance document, I have element 'e'1 
present with an xsi:type of 'int' and a content of '123'. Would the 
content of element 'e1' be considered valid or invalid?

Regards, 
Khaled

[1] http://www.w3.org/TR/xmlschema-1/#d0e4333
Received on Wednesday, 13 April 2005 00:53:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 October 2007 06:13:36 GMT