You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/09/07 21:32:06 UTC

[DO NOT REPLY: Bug 3504] New: xsltc fails conf test select72 on union of same variable

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=3504

*** shadow/3504	Fri Sep  7 12:32:05 2001
--- shadow/3504.tmp.365	Fri Sep  7 12:32:06 2001
***************
*** 0 ****
--- 1,73 ----
+ +============================================================================+
+ | xsltc fails conf test select72 on union of same variable                   |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 3504                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: 2.0.0                   |
+ |   Resolution:                            Platform: Sun                     |
+ |     Severity: Normal                   OS/Version: Solaris                 |
+ |     Priority: Other                     Component: org.apache.xalan.xsltc  |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xalan-dev@xml.apache.org                                     |
+ |  Reported By: tamiro@east.sun.com                                          |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ This test assigns a node to var1 and then assigns a union of var1 and var1 to
+ var2, expecting the count of nodes contained by var2 to be 2. XT, Xalan, and
+ Saxon return a count of 2 for var2, whereas xsltc incorrectly returns 1.
+ 
+ Expected Output for select72
+ ----------------------------
+ <?xml version="1.0" encoding="UTF-8"?>
+ <out>
+ Count of node-set: 1
+ Count of union: 1</out>
+ 
+ 
+ Obtained Ouput for select72
+ ---------------------------
+ <?xml version="1.0" encoding="utf-8" ?>
+ <out>
+ Count of node-set: 1
+ Count of union: 0</out>
+ 
+ select72.xsl
+ ------------
+ <?xml version="1.0"?>
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ 
+   <!-- FileName: select72 -->
+   <!-- Document: http://www.w3.org/TR/Xpath -->
+   <!-- DocVersion: 19991116 -->
+   <!-- Section: 3.3 Node Sets -->
+   <!-- Purpose: NodeSet union using two copies of same node, and variables -->
+   <!-- Creator: David Marston -->
+   <!-- This could be used to establish that the variable is of the node-set
+ type,
+      as opposed to string or one-node RTF, where the count would go up. -->
+ 
+ <xsl:template match="/">
+   <out>
+     <xsl:variable name = "var1" select = "doc/sub1/child1" />
+     <xsl:text>
+ Count of node-set: </xsl:text>
+     <xsl:value-of select = "count($var1)"/>
+     <xsl:variable name = "var2" select = "$var1|$var1" />
+     <xsl:text>
+ Count of union: </xsl:text>
+     <xsl:value-of select = "count($var2)"/>
+   </out>
+ </xsl:template>
+ 
+ </xsl:stylesheet> 
+ 
+ select72.xml
+ ------------
+ <?xml version="1.0"?>
+ <doc>
+   <sub1>
+     <child1>child1</child1>
+   </sub1>
+ </doc>