DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14628>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14628 Invalid handling of top-level variables declaration together with stylesheet include/import ------- Additional Comments From [EMAIL PROTECTED] 2002-11-17 17:29 ------- Here is full test log: ====================== t.xml ===== <?xml version="1.0"?> <root/> 2.xsl ===== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:variable name="test">[2]</xsl:variable> </xsl:stylesheet> =============================[ Test 1 ]=================================== 1.xsl ===== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:include href="2.xsl"/> <xsl:variable name="test">[1]</xsl:variable> <xsl:template match="/"> <xsl:value-of select="$test"/> </xsl:template> </xsl:stylesheet> ----------[ Results ]----------- Sablotron 0.96.1 ================ c:\test>sabcmd 1.xsl t.xml Error [code:53] [URI:file://C:/test/2.xsl] [line:6] conflicting variable bindings 'test' Xalan 1.2 ========= c:\test>testxslt -in t.xml -xsl 1.xsl -q <?xml version="1.0" encoding="UTF-8"?> [1] LibXSLT 1.0.22 ============== c:\test>xsltproc 1.xsl t.xml <?xml version="1.0"?> [2] MSXML 3.1 SP1 ============= c:\test>msxsl t.xml 1.xsl Error occurred while compiling stylesheet '1.xsl'. Code: 0x80004005 Global variable or parameter 'test' cannot be defined more than once with the same import precedence. =============================[ Test 2 ]=================================== 1.xsl ===== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:variable name="test">[1]</xsl:variable> <xsl:include href="2.xsl"/> <xsl:template match="/"> <xsl:value-of select="$test"/> </xsl:template> </xsl:stylesheet> ----------[ Results ]----------- Sablotron 0.96.1 ================ c:\test>sabcmd 1.xsl t.xml Error [code:53] [URI:file://C:/test/2.xsl] [line:4] conflicting variable bindings 'test' Xalan 1.2 ========= c:\test>testxslt -in t.xml -xsl 1.xsl -q <?xml version="1.0" encoding="UTF-8"?> [2] LibXSLT 1.0.22 ============== c:\test>xsltproc 1.xsl t.xml <?xml version="1.0"?> [1] MSXML 3.1 SP1 ============= c:\test>msxsl t.xml 1.xsl Error occurred while compiling stylesheet '1.xsl'. Code: 0x80004005 Global variable or parameter 'test' cannot be defined more than once with the same import precedence. Error occurred during compilation of included or imported stylesheet 'file:///C:/test/2.xsl'. =============================[ Test 3 ]=================================== 1.xsl ===== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:import href="2.xsl"/> <xsl:variable name="test">[1]</xsl:variable> <xsl:template match="/"> <xsl:value-of select="$test"/> </xsl:template> </xsl:stylesheet> ----------[ Results ]----------- Sablotron 0.96.1 ================ c:\test>sabcmd 1.xsl t.xml <?xml version="1.0" encoding="UTF-8"?>[2] Xalan 1.2 ========= c:\test>testxslt -in t.xml -xsl 1.xsl -q <?xml version="1.0" encoding="UTF-8"?> [1] LibXSLT 1.0.22 ============== c:\test>xsltproc 1.xsl t.xml <?xml version="1.0"?> [1] MSXML 3.1 SP1 ============= c:\test>msxsl t.xml 1.xsl <?xml version="1.0" encoding="UTF-16"?> [1] =============================[ Test 4 ]=================================== 1.xsl ===== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:include href="2.xsl"/> <xsl:variable name="test">[1]</xsl:variable> <xsl:variable name="test">[3]</xsl:variable> <xsl:template match="/"> <xsl:value-of select="$test"/> </xsl:template> </xsl:stylesheet> ----------[ Results ]----------- Sablotron 0.96.1 ================ c:\test>sabcmd 1.xsl t.xml Error [code:53] [URI:file://C:/test/2.xsl] [line:6] conflicting variable bindings 'test' Xalan 1.2 ========= c:\test>testxslt -in t.xml -xsl 1.xsl -q <?xml version="1.0" encoding="UTF-8"?> [3] LibXSLT 1.0.22 ============== c:\test>xsltproc 1.xsl t.xml <?xml version="1.0"?> [2] MSXML 3.1 SP1 ============= c:\test>msxsl t.xml 1.xsl Error occurred while compiling stylesheet '1.xsl'. Code: 0x80004005 Global variable or parameter 'test' cannot be defined more than once with the same import precedence. =============================[ Test 5 ]=================================== 1.xsl ===== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:variable name="test">[1]</xsl:variable> <xsl:variable name="test">[3]</xsl:variable> <xsl:include href="2.xsl"/> <xsl:template match="/"> <xsl:value-of select="$test"/> </xsl:template> </xsl:stylesheet> ----------[ Results ]----------- Sablotron 0.96.1 ================ c:\test>sabcmd 1.xsl t.xml Error [code:53] [URI:file://C:/test/1.xsl] [line:5] conflicting variable bindings 'test' Xalan 1.2 ========= c:\test>testxslt -in t.xml -xsl 1.xsl -q <?xml version="1.0" encoding="UTF-8"?> [2] LibXSLT 1.0.22 ============== c:\test>xsltproc 1.xsl t.xml runtime error: file 1.xsl line 5 element variable Global variable test already defined no result for t.xml MSXML 3.1 SP1 ============= c:\test>msxsl t.xml 1.xsl Error occurred while compiling stylesheet '1.xsl'. Code: 0x80004005 Global variable or parameter 'test' cannot be defined more than once with the same import precedence. =============================[ Test 6 ]=================================== 1.xsl ===== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:import href="2.xsl"/> <xsl:variable name="test">[1]</xsl:variable> <xsl:variable name="test">[3]</xsl:variable> <xsl:template match="/"> <xsl:value-of select="$test"/> </xsl:template> </xsl:stylesheet> ----------[ Results ]----------- Sablotron 0.96.1 ================ c:\test>sabcmd 1.xsl t.xml Error [code:53] [URI:file://C:/test/2.xsl] [line:7] conflicting variable bindings 'test' Xalan 1.2 ========= c:\test>testxslt -in t.xml -xsl 1.xsl -q <?xml version="1.0" encoding="UTF-8"?> [3] LibXSLT 1.0.22 ============== c:\test>xsltproc 1.xsl t.xml runtime error: file 1.xsl line 7 element variable Global variable test already defined no result for t.xml MSXML 3.1 SP1 ============= c:\test>msxsl t.xml 1.xsl Error occurred while compiling stylesheet '1.xsl'. Code: 0x80004005 Global variable or parameter 'test' cannot be defined more than once with the same import precedence.
