Re: NEW ISSUE: Schema tweaks

Patient: Hey doc, it hurts when I use an xs:duration of 1M1D because it 
depends on what month it is
Doctor: Don't do that!

Sure, an xs:unsignedLong that represents milliseconds *seems* simpler 
until you get into squirrelly areas
like the fact that Java does not have a primitive type for xs:unsignedLong 
which means you need to
manipulate it with java.math.BigDecimal which is not very efficient.

It seems to me that xs:duration is exactly what the doctor ordered here. 
The nice thing is that the semantic
is self describing. It's a duration and you get to express the quanta 
(years, months, days, hours, minutes, seconds, etc.)
as part of the value-space.

Cheers,

Christopher Ferris
STSM, Emerging e-business Industry Architecture
email: chrisfer@us.ibm.com
blog: http://webpages.charter.net/chrisfer/blog.html
phone: +1 508 377 9295



Anish Karmarkar <Anish.Karmarkar@oracle.com> 
Sent by: public-ws-addressing-request@w3.org
03/01/2005 03:49 PM

To
Rich Salz <rsalz@datapower.com>
cc
"Rogers, Tony" <Tony.Rogers@ca.com>, Jonathan Marsh 
<jmarsh@microsoft.com>, "public-ws-addressing@w3.org" 
<public-ws-addressing@w3.org>
Subject
Re: NEW ISSUE: Schema tweaks







Rich Salz wrote:
>>Any reason not to use xs:duration rather than xs:unsignedInt or some
>>derived type of it?
> 
> 
> They seem much more complicated then a simple integer.
> 
> For example, the length of a duration depends on when you send it (e.g.,
> 1M1D could be anywhere from 29 to 32 days).
> 

Seems like a good reason not to use xs:duration.
Thx!

-Anish
--

Received on Tuesday, 1 March 2005 21:57:41 UTC