PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2972

*** shadow/2972 Thu Aug  2 14:57:28 2001
--- shadow/2972.tmp.29917       Sun Aug  5 23:17:10 2001
***************
*** 2,8 ****
  | Testing variables cause an NPE                                             |
  +----------------------------------------------------------------------------+
  |        Bug #: 2972                        Product: XalanJ2                 |
! |       Status: NEW                         Version: CurrentCVS              |
  |   Resolution:                            Platform: Other                   |
  |     Severity: Normal                   OS/Version: All                     |
  |     Priority: Other                     Component: org.apache.xalan        |
--- 2,8 ----
  | Testing variables cause an NPE                                             |
  +----------------------------------------------------------------------------+
  |        Bug #: 2972                        Product: XalanJ2                 |
! |       Status: ASSIGNED                    Version: CurrentCVS              |
  |   Resolution:                            Platform: Other                   |
  |     Severity: Normal                   OS/Version: All                     |
  |     Priority: Other                     Component: org.apache.xalan        |
***************
*** 37,39 ****
--- 37,67 ----
  ------- Additional Comments From [EMAIL PROTECTED]  2001-08-02 14:57 -------
  Created an attachment (id=383)
  A much shorter version of the XSL File
+ 
+ 
+ ------- Additional Comments From [EMAIL PROTECTED]  2001-08-05 23:17 -------
+ In the example given, the variable
+ access is being done inside the definition of that variable.  This is
+ definately not allowed.  I just checked in a fix that gives you hopefully a
+ reasonable error message ("Variable accessed before it is bound!").  From
+ the recommendation: "xsl:variable is allowed anywhere within a template
+ that an instruction is allowed. In this case, the binding is visible for
+ all following siblings and their descendants. Note that the binding is not
+ visible for the xsl:variable element itself. xsl:param is allowed as a
+ child at the beginning of an xsl:template element. In this context, the
+ binding is visible for all following siblings and their descendants. Note
+ that the binding is not visible for the xsl:param element itself."
+ (http://www.w3.org/TR/xslt#local-variables).
+ 
+ There is another error in the stylesheet that Xalan or XT does not catch,
+ though Saxon does: "A binding shadows another binding if the binding occurs
+ at a point where the other binding is visible, and the bindings have the
+ same name. It is an error if a binding established by an xsl:variable or
+ xsl:param element within a template shadows another binding established by
+ an xsl:variable or xsl:param element also within the template. It is not an
+ error if a binding established by an xsl:variable or xsl:param element in a
+ template shadows another binding established by an xsl:variable or
+ xsl:param top-level element."  So Saxon throws a "Error at xsl:variable on
+ line 6 of file:/E:/xml-xalan/test/tests/conf/x.xsl:
+   Variable is already declared in this template" error.  So I'm going to
+ keep the bug open for a bit until we fix this, i.e. throw an error.

Reply via email to