[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

Subject: 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
 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.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.