RE: What is the canonical lexical representation of duration?

There is no canonical form for duration since there is but a single
lexical representation.

The lexical forms P1Y and P12M map to different values.

 

Some people had problems with this datatype since it does not have a
total order.

To solve this problem we defined two subtypes of duration called
dayTimeDuration and yearMonthDuration that have a total order and
correspond to similarly named SQL types.

All the best, Ashok 
=========================================================== 
Ashok Malhotra              <mailto: ashokma@microsoft.com
<mailto:%20ashokma@microsoft.com> > 
Microsoft Corporation 
212 Hessian Hills Road 
Croton-On-Hudson, NY 10520 USA 
Redmond: 425-703-9462                New York: 914-271-6477 

 

-----Original Message-----
From: John Mercado [mailto:johnkmercado@yahoo.com] 
Sent: Tuesday, September 03, 2002 10:04 AM
To: W3C XML Schema Comments list
Subject: What is the canonical lexical representation of duration?

 


Hi,

What is the canonical lexical representation of duration?, and how do I
get there from any other lexical representation.  I ask because I am
trying to understand the XQuery yearMonthDuration and dayTimeDuration
types.  Those two types have a canonical form that converts, for
example, P1Y to P12M.  So, there is only one value in the value space
that equals this amount of time.  This makes sense, but it is not the
way I thought the XML Schema types worked.  Are the duration values P1Y
and P12M considered to be the same value?  

If so, how do I know which one is the canonical form?  The rec doesn't
say anything about this.  

If not, isn't the XQuery spec in direct violation of the XML Schema spec
for converging values in the value space?

This question aside, there is also the minor point of other different
lexical representations (e.g. leading zeros in the number values,
trailing zeros in the number of seconds) that would also need to be
clarified when deciding on the canonical representation for duration.

Thanks,

John Mercado



Do You Yahoo!?
Yahoo! Finance
<http://rd.yahoo.com/finance/mailsig/new/*http:/finance.yahoo.com>  -
Get real-time stock quotes 

Received on Tuesday, 17 September 2002 11:25:54 UTC