Re: <enumeration> of duration types

Michael Kay wrote:
>>should a value of "P12M" be considered a valid value for a "duration"
>>based simple type with an <enumeration> value of "P1Y"?
> 
> 
> I believe the answer is strictly-speaking no, though Saxon currently allows
> it. (Oddly I was just today starting to implement the code that enforces the
> stricter interpretation.)
> 
> The schema spec says that the value space contains six separate numeric
> components and it says nothing about normalizing the value. Equality is
> based on identity in the value space.
> 
> Michael Kay
> 
> 
> 

The spec lays out the order in 3.2.6.2 [1] and clarifies normalization.

P12M is indeed P1Y but the comparison to P365D fails.

[1] http://www.w3.org/TR/xmlschema-2/#duration-order

-Anli

-- 
Anli Shundi                     ashundi@tibco.com
TIBCO Software Inc.             (919) 969 6518
www.tibco.com

Received on Thursday, 14 April 2005 15:11:09 UTC