[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[no subject]

[no subject]
For any use of these variable-binding elements, there is a region of the
stylesheet tree within which the binding is visible; within this region,
any binding of the variable that was visible on the variable-binding
element itself is hidden. Thus, only the innermost binding of a variable is
visible. The set of variable bindings in scope for an expression consists
of those bindings that are visible at the point in the stylesheet where the
expression occurs.

So saxon9he seems to assue the second definition of v as innermost binding,
while xsltproc seems to see both on the same binding level.
What is the spec conforming behavior?

$ xsltproc -version
Using libxml 20626, libxslt 10117 and libexslt 813
xsltproc was compiled against libxml 20626, libxslt 10117 and libexslt 813
libxslt 10117 was compiled against libxml 20626
libexslt 813 was compiled against libxml 20626
$ xsltproc m.xsl m.xsl
runtime error: file m.xsl line 8 element variable
xsl:variable : redefining v
no result for m.xsl
$ java -jar saxon9he.jar -xmlversion:1.0 -xsl:m.xsl -s:m.xsl
-versionmsg:off ; echo
<?xml version="1.0" encoding="UTF-8"?>12
$
$ cat m.xsl
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
  <xsl:template match="/">

    <xsl:variable name="v" select="1"/>
    <xsl:value-of select="$v"/>
    <xsl:variable name="v" select="2"/>
    <xsl:value-of select="$v"/>

  </xsl:template>
</xsl:stylesheet>
$


Mit besten Gruessen / Best wishes,

Hermann Stamm-Wilbrandt
Developer, XML Compiler, L3
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

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.