[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSLT 3.0: Example of <xsl:evaluate> contains redundant
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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|