Feature #4961
openuse-when in SEF compilation phase
0%
Description
ac:uuid
is my custom extension function which is obviously not available client-side. But using use-when
as follows allowed me to differentiate between function calls on the server and in the browser:
<xsl:value-of use-when="system-property('xsl:product-name') eq 'Saxon-JS'" select="resolve-uri(concat('/', ixsl:call(ixsl:window(), 'generateUUID', [])), $ac:uri)"/>
<xsl:value-of use-when="system-property('xsl:product-name') = 'SAXON'" select="resolve-uri(concat('/', ac:uuid()), $ac:uri)"/>
That worked fine when compiling SEF with Saxon-JS. Now I'm trying Saxon-EE for that, and a different use-when
kicks in and I get an error about the missing ac:uuid
function:
Error near {...ve-uri(concat('/', ac:uuid(...} at char 24 in xsl:value-of/@select on line 460 column 175 of default.xsl:
XPST0017 Cannot find a 0-argument function named Q{https://w3id.org/atomgraph/client#}uuid()
Error near {...ac:forClass, $ldt:base) els...} at char 24 in xsl:param/@select on line 230 column 161 of resource.xsl:
XPST0017 Cannot find a 3-argument function named
Q{https://w3id.org/atomgraph/client#}construct-doc()
Is there a workaround here? Can some property be used to differentiate between compilation and execution phases in use-when
?
Please register to edit this issue
Also available in: Atom PDF Tracking page