Bug #5807
open
current() does not work when invoked via xsl:evaluate
0%
Description
When passing the following expression to @xpath
of xsl:evaluate
in SaxonJS, instance('i2')/month[@code = current()]
, I get the error "The current() construct is not implemented in SaxonJS"
- Stylesheet location (context): https://github.com/Saxonica/Saxon-Forms/blob/5ab05598219361cfb56b730da9d30409b0726cf1/src/saxon-xforms.xsl#L1468-L1481
- See also: https://github.com/Saxonica/Saxon-Forms/issues/20
- Normative reference: https://www.w3.org/TR/xforms11/#fn-current
Note that this error is masked by another error related to namespace declarations, which is more fully described in Saxon-Forms #20. (the error can be suppressed by removing the @namespace-context
from xsl:evaluate
).
Updated by Michael Kay 2 months ago
The XSLT 3.0 specification lists the functions that are available within xsl:evaluate at https://www.w3.org/TR/xslt-30/#evaluate-static-context and the list explicitly excludes functions defined in XSLT as distinct from the F&O specification.
So it's not going to be there automatically by virtue of being defined in XSLT. Arguably the current() in XForms is a different function. How you add XForms functions is another question...
Please register to edit this issue
Also available in: Atom PDF Tracking page