OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] 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

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?





"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

blog: www.NewDaedalus.com



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

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS