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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] XPath 1.5? (was RE: [xml-dev] typing and markup)

[ Lists Home | Date Index | Thread Index ]

Amelia Lewis wrote:
> XSDL has *nine* datatypes related to time information (date, time,
> dateTime, duration, and 5 x gHorribleKludge), all of which are
> primitive types with similar (sometimes nearly identical, especially
> in the gHorribleKludge set) lexical representations, and no common
> ancestor but anySimpleType.
> Does this correspond to a programming language that you currently
> use? If so, could you let me know? I'll want to be sure to avoid
> that one at all costs ....

The latest XQuery/XPath F&O WD provides an added complexity by
dividing durations into two distinct types: dayTimeDurations (that
don't have year or month components) and yearMonthDurations (that only
have year or month components), with similar subdivisions between the
versions of the date/time data types that have timezones and those
that don't. You're only allowed to say that one duration is less than
another if they're of the same type. For example, you can't compare a
duration of 1 year with a duration of 1 second:

  xf:duration('P1Y') > xf:duration('PT1S')

because in general durations don't have a total order (you can't say
with certainty whether 30 days is more or less or equal to 1 month).

So if you count XQuery and XSLT 2.0 as programming languages...



Jeni Tennison


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

Copyright 2001 XML.org. This site is hosted by OASIS