add-dayTimeDuration-to-date
Friday, 27 December 2013 · 3 messages · last reply 11 Jan 2014
JM
jean-marc Mercier27 Dec 2013 16:33 #
Hello,
I am trying to add dates and duration through BaseX, in conformance with http://www.w3.org/TR/xpath-functions-30/#func-add-dayTimeDuration-to-date.
However, BaseX interpreter does not recognize the function
add-dayTimeDuration-to-date,
nor op:add-dayTimeDuration-to-date.
Did I misunderstood something ?
Thanx for your answer,
Cheers,
Jean-Marc
CG
Christian Grün11 Jan 2014 13:00 #
Hi Jean-Marc,
back from my vacation.. I’ll try to give feedback to your (and all other) pending mails as soon as possible!
Quoted text · jean-marc Mercier · 5 lines
> I am trying to add dates and duration through BaseX, in conformance with > http://www.w3.org/TR/xpath-functions-30/#func-add-dayTimeDuration-to-date. > > However, BaseX interpreter does not recognize the function > add-dayTimeDuration-to-date, nor op:add-dayTimeDuration-to-date.
Functions using the op prefix are not available directly to users. The spec says that “Functions defined with the op prefix are described here to underpin the definitions of the operators in [XML Path Language (XPath) 3.0], [XQuery 3.0: An XML Query Language] and [XSL Transformations (XSLT) Version 3.0]. These functions are not available directly to users, and there is no requirement that implementations should actually provide these functions. For this reason, no namespace is associated with the op prefix.” [1].
Hope this helps!
Christian
[1] http://www.w3.org/TR/xpath-functions-30/#namespace-prefixes
Quoted text · jean-marc Mercier · 14 lines
> > Did I misunderstood something ? > > Thanx for your answer, > > Cheers, > > Jean-Marc > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
CG
Christian Grün11 Jan 2014 13:07 #
…what I forgot to say: you can simply use the plus operator to add dates and durations:
xs:date("2004-10-30Z") + xs:dayTimeDuration("P2DT2H30M0S")Quoted text · Christian Grün · 42 lines
On Sat, Jan 11, 2014 at 1:00 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Jean-Marc, > > back from my vacation.. I’ll try to give feedback to your (and all > other) pending mails as soon as possible! > >> I am trying to add dates and duration through BaseX, in conformance with >> http://www.w3.org/TR/xpath-functions-30/#func-add-dayTimeDuration-to-date. >> >> However, BaseX interpreter does not recognize the function >> add-dayTimeDuration-to-date, nor op:add-dayTimeDuration-to-date. > > Functions using the op prefix are not available directly to users. The > spec says that “Functions defined with the op prefix are described > here to underpin the definitions of the operators in [XML Path > Language (XPath) 3.0], [XQuery 3.0: An XML Query Language] and [XSL > Transformations (XSLT) Version 3.0]. These functions are not available > directly to users, and there is no requirement that implementations > should actually provide these functions. For this reason, no namespace > is associated with the op prefix.” [1]. > > Hope this helps! > Christian > > [1] http://www.w3.org/TR/xpath-functions-30/#namespace-prefixes > > >> >> Did I misunderstood something ? >> >> Thanx for your answer, >> >> Cheers, >> >> Jean-Marc >> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>
Written for BaseX 7.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery