Login  Register

Re: Xpath fn:seconds-from-dateTime() not working

Posted by fl.schmitt(ops-users) on Feb 18, 2011; 7:59pm
URL: https://discuss.orbeon.com/Xpath-fn-seconds-from-dateTime-not-working-tp3313272p3313447.html

ssethia,

the seconds-from-dateTime() function that's part of XForms 1.1 has a
different signature then the seconds-from-dateTime() as defined in
XPath 2.0. The former (XForms 1.1) expects a "string" and returns a
"nubmer", the latter (XPath 2.0) expects a xs:dateTime and returns a
xs:decimal.

Obviously, you can't "force" the XForms engine to use the XPath 2.0
function by passing a xs:dateTime value; it's the XForms function
that's executed. So, just drop the xs:dateTime cast and replace the
ref by a value -> works perfectly :-)

<xforms:output
 value="seconds-from-dateTime('2010-11-11T13:56:47-07:00')"/>


HTH
florian


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws