W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2003

RE: F&O - Is extract(month, myDateTimeItem) possible?

From: Paul Cotton <pcotton@microsoft.com>
Date: Mon, 5 May 2003 05:13:10 -0400
Message-ID: <E7AC4500EAB7A442ABA7521D1881439706324C92@tor-msg-01.northamerica.corp.microsoft.com>
To: "Kay, Michael" <Michael.Kay@softwareag.com>, <Svgdeveloper@aol.com>
Cc: <public-qt-comments@w3.org>

As I remember it, the main reason we chose individual functions was to
ensure they each have strong typing of their input parameters and to
ensure the appropriate return type e.g. xs:integer, xs:decimal or
xdt:dayTimeDuration.

/paulc

Paul Cotton, Microsoft Canada 
17 Eleanor Drive, Nepean, Ontario K2E 6A3 
Tel: (613) 225-5445 Fax: (425) 936-7329 
mailto:pcotton@microsoft.com

  

> -----Original Message-----
> From: public-qt-comments-request@w3.org [mailto:public-qt-comments-
> request@w3.org] On Behalf Of Kay, Michael
> Sent: May 4, 2003 7:37 PM
> To: Svgdeveloper@aol.com; public-qt-comments@w3.org
> Subject: RE: F&O - Is extract(month, myDateTimeItem) possible?
> 
> 
> It would be possible, and it is an option that we considered, but we
> decided
> against it. I don't think the reasons were absolutely compelling; it
is
> hard
> to argue a strong case for either solution over the other. (We also
> considered a third solution, namely a single extract function that
returns
> all the components as a sequence).
> 
> Michael Kay
> 
> > -----Original Message-----
> > From: Svgdeveloper@aol.com [mailto:Svgdeveloper@aol.com]
> > Sent: 02 May 2003 07:17
> > To: public-qt-comments@w3.org
> > Subject: F&O - Is extract(month, myDateTimeItem) possible?
> >
> >
> >
> > I and a friend have been independently exploring the
> > date-time functions in
> > XPath 2.0 / XQuery 1.0. They are very tedious to hand code.
> >
> > Looking at this from a coder's point of view, it would be
> > much nicer to have
> > something like,
> >
> > extract(someDesiredDateComponent, someDateTimeItem)
> >
> > rather than a mulitiplicity of
> > get-somethingInteresting-from-gHorribleKludge() functions.
> >
> > So, would it be possible to replace the panoply of component
> > extraction
> > functions with, for example,
> >
> > extract(month, myItemName)
> >
> > the first argument being all legal components (seconds,
> > minutes, timezone
> > etc) and the second argument being simply an item name (not
> > even requiring a
> > coder to master all the gHorribleKludge types), with the item
> > having to be a
> > date-time type?
> >
> > So I guess I am asking several questions:
> >
> > 1. Is there a good reason for having the multiplicity of
> > dateTime component
> > extraction functions as separate functions?
> > 2. Is there a compelling technical reason why extract(month,
> > myDateTimeItem)
> > couldn't work or is perceived as technically inferior?
> > 3. Depending on the answers to 1. and 2. is the WG willing to
> > consider a more
> > compact syntax requiring fewer date-time component extraction
> > functions?
> >
> > I appreciate that we are now 5.5 months into the nominal "3
> > month" WD cycle,
> > so I guess a new batch of WDs will arrive soon, so even if
> > found worth
> > exploring I accept that any acceptance of the idea won't be
> > immediately
> > expressed in a WD.
> >
> > I would be interested in the WG's comments.
> >
> > Andrew Watt
> >
Received on Monday, 5 May 2003 05:13:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT