Thanks! It's great to have someone who really knows XML Schema around :)

Till

On Aug 23, 2012, at 10:01 AM, Cezar Andrei wrote:

> If you look at the schema definition of most of the built-in types in
> schema4schema:
> http://www.w3.org/2001/XMLSchema.xsd
> 
> For example dateTime:
> <xs:simpleType name="dateTime" id="dateTime">
>  <xs:restriction base="xs:anySimpleType">
>     <xs:whiteSpace value="collapse" fixed="true" id="dateTime.whiteSpace"/>
>  </xs:restriction>
> </xs:simpleType>
> 
> It has the whiteSpace restriction to collapse, which means you need to
> apply the collapse (contiguous sequences of #x20's are collapsed to a
> single #x20, and leading and trailing #x20's are removed) rule before
> parsing the value.
> http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace
> 
> Cezar
> 
> On Thu, Aug 23, 2012 at 1:21 AM, Till Westmann <[email protected]> wrote:
> 
>> That's indeed strange. Quickly scanning the specs I didn't find anything
>> that indicates that whitespace should be stripped before casting. However,
>> if those are the XQTS tests I would be very reluctant to modify them.
>> 
>> If you don't find a definite answer in the spec, I would leave the tests
>> as-is and file a JIRA issue to explain the problem.
>> 
>> Cheers,
>> Till
>> 
>> On Aug 22, 2012, at 5:27 PM, Eldon Carman wrote:
>> 
>>> I am looking at the g* comparisons and I found that a few of them have
>>> extra white space in the definition. Currently the casting process
>>> throws an error because it sees a character it does not recognize.
>>> Where should the white space be removed? Should the cast support extra
>>> spaces in the string?
>>> 
>>> xs:gMonth("--11  ")
>>> xs:gDay(" ---31  ")
>> 
>> 

Reply via email to