W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2005

Re: normalized enumeration facet values

From: Kasimier Buchcik <kbuchcik@4commerce.de>
Date: Tue, 15 Mar 2005 21:04:08 +0100
Message-ID: <42373FB8.2010608@4commerce.de>
To: "Henry S. Thompson" <ht@inf.ed.ac.uk>
CC: xmlschema-dev@w3.org


Henry S. Thompson wrote:
> Kasimier Buchcik <kbuchcik@4commerce.de> writes:
>>I stumbled over a difference between XSV 2.7 and Xerces-J 2.6.2, related
>>to whitespace handling of enumeration facet values. XSV seems not to use
>>the normalized value of the facet in this case, while Xerces does.
> That's a bug -- I'm embarassed I wasn't detecting that in my testing :-(
> Will be fixed in next release.

I still have a question concerning a similar issue: If restricting the
value of the whitespace facet of the base type, what whitespace
value is actually used for validation, the inherited or the restricted?


<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="foo">
       <restriction base="string">
         <enumeration value="hel   lo"/>
         <whiteSpace value="collapse"/>

<?xml version="1.0"?>
<foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 >  hel lo  </foo>

Xerces uses the inherited whitespace value for normalization:

"(Error) cvc-enumeration-valid: Value 'hel lo' is not facet-valid with 
respect to enumeration '[hel   lo]'. It must be a value from the 

XSV (I'm not sure if it just fails due to the bug):

"element content failed type check: hel lo not in enumeration [hel lo]"

Note that XSV is reporting the "collapsed" value of the enumeration


Received on Tuesday, 15 March 2005 20:04:45 UTC

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