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=3406 *** shadow/3406 Tue Sep 4 07:57:43 2001 --- shadow/3406.tmp.23103 Tue Sep 4 07:57:43 2001 *************** *** 0 **** --- 1,66 ---- + +============================================================================+ + | xsltc fails conf test variable33,34,35 with compile error on undefined var | + +----------------------------------------------------------------------------+ + | Bug #: 3406 Product: XalanJ2 | + | Status: NEW Version: CurrentCVS | + | Resolution: Platform: All | + | Severity: Minor OS/Version: All | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + While the outcome is severe -- a compilation exception -- there is an + easy work-around. These tests try to reference a variable before it has + been defined, so the work-around is to define the variable before refenencing + it. Note: XT, Saxon, and Xalan all are able to handle the case where the + variable is referenced before it is defined. + + Here's the details for variable33 + + Expected Output + --------------- + <?xml version="1.0" encoding="UTF-8"?> + <out>titi</out> + + Obtained Output + --------------- + Compile errors: + Variable or parameter 'toto' is undefined. + Error parsing XPath expression '$toto'. + + + variable33.xsl + -------------- + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + + <!-- FileName: variable33 --> + <!-- Document: http://www.w3.org/TR/xslt --> + <!-- DocVersion: 19991116 --> + <!-- Section: 11.4 Top-level Variables and Parameters --> + <!-- Purpose: Set top-level variable with a forward reference to see what + happens. --> + <!-- Author: David Marston --> + + <xsl:variable name="tata" select="$toto"/> + + <xsl:param name="toto" select="'titi'"/> + + <xsl:template match="/"> + <out> + <xsl:value-of select="$tata"/> + </out> + </xsl:template> + + </xsl:stylesheet> + + variable33.xml + -------------- + <?xml version="1.0"?> + <doc/>
