W3C home > Mailing lists > Public > public-forms@w3.org > January 2010

Re: XPath 2.0

From: John Boyer <boyerj@ca.ibm.com>
Date: Tue, 26 Jan 2010 14:42:13 -0800
To: Nick Van den Bleeken <Nick_Van_den_Bleeken@inventivegroup.com>
Cc: Erik Bruchez <ebruchez@orbeon.com>, "public-forms@w3.org" <public-forms@w3.org>
Message-ID: <OF910AC769.21D9CAC3-ON882576B7.007C7F75-882576B7.007CB654@ca.ibm.com>
I had thought we agreed that the function signatures would indeed be 
different between XPath 1.0 and XPath 2.0, and that the XPath 2.0 function 
signatures would be more precise.

I think we also talked about XPath 2.0 being optional to implement in 
XForms 1.x and therefore activated by the attribute, i.e. that the default 
in the absence of an attribute would be XPath 1.0 since that is the 
required engine for XForms 1.x.

John M. Boyer, Ph.D.
STSM, Lotus Forms
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Blog RSS feed: 

Nick Van den Bleeken <Nick_Van_den_Bleeken@inventivegroup.com>
"public-forms@w3.org" <public-forms@w3.org>
Erik Bruchez <ebruchez@orbeon.com>
01/21/2010 05:23 PM
XPath 2.0

Hi all,
I want to ask the opinion of the Working Group members (and other 
interested people) regarding some possible changes that could be made to 
the ‘XForms 1.2: XPath 2.0 support Module’ [1].
In xpath 2.0 the function signatures:
xs:decimal seconds-from-dateTime(xs: dateTime) 
xs: dateTime seconds-to-dateTime(numeric)
Would make more sense then:
xs:decimal seconds-from-dateTime(xs:string) 
xs:string seconds-to-dateTime(numeric)
We opted at the last FtF meeting for xs:string instead of xs: dateTime for 
backwards compatibility with XForms 1.1. 
But we have an XPath version number attribute on model which can put the 
XForms engine in XPath 1.0 compatibility mode, we could say that XForms 
functions return types matching the XForms 1.1 types if 
xpath-version="1.0". Otherwise, the XPath 2.0-compatible signatures are 
used (with xs: dateTime). Migrating an XPath 1.0 form to XPath 2.0 will 
likely require some changes to a form anyway, and more precise types will 
ensure more power and easier detection of errors.
All input is, as always, welcome.
Nick Van den Bleeken
R&D Manager
Phone: +32 3 821 01 70
Office Fax: +32 3 821 01 71


PS: Adding an example with a dateTime with fractional seconds would be 
welcome too, before running the test suite I always thought the result was 
rounded down to an integer (e.g.: ‘1970-01-01T00:00:00.001Z’ returns 

Inventive Designers' Email Disclaimer:

This message has been scanned for viruses and 
dangerous content, and is believed to be clean. 

Received on Tuesday, 26 January 2010 22:42:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:48:39 UTC