[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Incompleteness of Duration

  • From: Michael Kay <mike@saxonica.com>
  • To: xml-dev@lists.xml.org
  • Date: Sat, 21 Apr 2012 19:54:14 +0100

Re:  Incompleteness of Duration
I don't think a specification in such a messy area can ever be "complete". The recent confusion between the UK government and the European Court of Human Rights over exactly when a three-month "right to appeal" ended illustrates the kind of complexities involved. If you try to model the civil calendar, then whatever scope you choose, there will be some things needed by some users that are outside the scope you have chosen.

It's worth noting that whereas there is some kind of consensus on when seconds, minutes, hours, days, months, and years start and end (subject to timezone issues), there is no consensus on when a week starts or ends. Although the 7-day week has become a pretty-near universal cultural phenomenon, things such as numbering of weeks within a year or month are still highly variable.

One can argue that the support for calendar and duration values in XSD and XQuery/XSLT doesn't go far enough, but one could equally well argue that there is already too much in the "core" and it should have been put in an application layer, just as spatial information (for example) is handled in an application layer.

Michael Kay
Saxonica

On 21/04/2012 18:54, Toby Considine wrote:
014c01cd1fe7$dbe29b20$93a7d160$@gmail.com" type="cite">

Probably not where to post tis, but a place where several of the right people will get it anyway.

 

The duration data type is an incomplete instantiation of duration as defined in ISO8601. In particular, it omits weeks, which are very useful for many human-centric  communications. As the internet of things begins to integrates devices and people, such communications are likely to grow more important.

 

In ISO8601, the elements of duration include second, minute, hour, day, week, month, year.

 

XML duration supports second, minute, hour, day, month, year

 

RFC5545 (previously 2445) defines duration using second, minute, hour, day, week.

 

Where ICalendar and XML overlap, they are identical.

 

xCal (RFC 6321) is the recently completed XML representation for iCalendar information. Because of the mismatch above, it uses its own string restrictions to define what it calls a duration. The overlapping is makes it worse. If XML fully implemented iso8601, then today’s xCal would be a strict sub-set; tomorrows could grow to identity, which would improve many uses.

 

The larger durations are not just multiple of the smaller durations. A day!= 24 hours, although it usually does. A month is clearly a variable number of days, and processing rules can define what a month from February 15 is  as well as a month from May 15. A year is not always 365 days,

 

The week appears to be no more than a multiple of 7 days, which is why, I assume, the XML committee left it out. When it intersects with the world of people, and of business, though, there are a multitude of differences. “Do this at the start of each week”, at a duration of 1W, might indicate a service performance on Tuesday in weeks in which there is a holiday on Monday. Many calendar specifications, such as recurrence rules and availability communications use durations denominated in weeks.

 

What is the correct approach, and where is the correct forum to start a conversation on fixing this?

 

tc

 

 


"You can cut all the flowers but you cannot keep spring from coming."
-Pablo Neruda.


Toby Considine
TC9, Inc

TC Chair: oBIX & WS-Calendar

TC Editor: EMIX, EnergyInterop

U.S. National Inst. of Standards and Tech. Smart Grid Architecture Committee

  

Email: Toby.Considine@gmail.com
Phone: (919)619-2104

http://www.tcnine.com/
blog: http://www.NewDaedalus.com

 

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.