[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] The XForms/XPath paradox


Subject: RE: [xsl] The XForms/XPath paradox
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 22 May 2008 18:09:35 +0100

> Why is it that the XForms people have to invent the 
> "boolean-from-string" XPath extension function?
> 
> What is missing, or has been forgotten, from our beloved 
> XPath 2 (& XQuery Functions & Operators library) to require 
> such an extension function and that which is not core?

Like most of the XForms extension functions, this was in XForms 1.0, which
came out in 2003, long before XPath 2.0 was ready. The functionality is
achieved in XPath 2.0 using the xs:boolean() constructor function.
Generally, I think nearly all the extension functions in XForms either do
something that's relatively easy in XPath 2.0 (but hard in XPath 1.0) or do
something (like instance() or property()) that's very specific to the XForms
environment.

It's unfortunate that XForms chose not to put these functions in their own
namespace (but then, XSLT set a bad precedent). It's also unfortunate that
at least one of the functions (seconds-from-dateTime()), has the same name
but different semantics from a function introduced into the core by XPath
2.0. 

Michael Kay
http://www.saxonica.com/


Current Thread
Keywords