|
Subject: [xsl] XSLT 3.0: Example of <xsl:evaluate> contains redundant parameters From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 7 Feb 2015 04:20:13 -0000 |
The last example in section 10.4.5 "Examples of xsl:evaluate" of the
2nd Last Call of the W3C "XSLT 3.0" specification, at:
http://www.w3.org/TR/2014/WD-xslt-30-20141002/#evaluate-examples
is this:
<xsl:function name="f:function-lookup">
<xsl:param name="name" as="xs:QName"/>
<xsl:param name="arity" as="xs:integer"/>
<xsl:evaluate xpath="'Q{' || namespace-uri-from-QName($name) || '}'
|| local-name-from-QName($name) || '#' || $arity">
<xsl:with-param name="name" as="xs:QName" select="$name"/>
<xsl:with-param name="arity" as="xs:integer" select="$arity"/>
</xsl:evaluate>
</xsl:function>
And this function can be called and produces the expected results.
However, the two <xsl:with-param> children of <xsl:evaluate> in this
example, are not needed, because the target expression, when
constructed, doesn't contain any variable references.
Therefore:
1. The example can be simplified by removing the two <xsl:with-param>
elements, and will be improved and made more clear as result of this
removal.
2. This means that the specification at present lacks an example of
<xsl:evaluate> where the target expression, after its construction,
contains variable references, although the above example may lead the
reader mistakenly believe, that this is exactly such example.
I hope that both point 1, and 2 above could be reflected and improved
in a future version of this document, by removing the unnecessary
<xsl:with-param> elements and by adding a new example, in which the
constructed target expression truly contains variable references.
Cheers,
Dimitre Novatchev.
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Group elements based on s, Kevin Bird kevinbria | Thread | [xsl] XSLT 3.0: Dynamic Evaluation , Dimitre Novatchev dn |
| Re: [xsl] Algorithm akin to namespa, Wendell Piez wapiez@ | Date | [xsl] XSLT 3.0: Dynamic Evaluation , Dimitre Novatchev dn |
| Month |