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=5765>.
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=5765

RTREEFRAG generated inside variable y value-of is used instead of select

           Summary: RTREEFRAG generated inside variable y value-of is used
                    instead of select
           Product: XalanJ2
           Version: 2.2.x
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: org.apache.xalan
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


<variable name="var" select="/node1/node2" /> returns a node list.

<variable name="var">
   <value-of select="node1/node2" />
</variable> returns RTREEFRAG and should return also a node list.

I include a real sample first XSLT works, second XSLT raises error:
Can not convert #RTREEFRAG to a NodeList! 


<?xml version='1.0' encoding='ISO-8859-1'?>
<doc>
<copies>
        <copy>Copy 1</copy>
        <copy>Copy 2</copy>
        <copy>Copy 3</copy>
</copies>
</doc>
-------------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" 
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                                xmlns:fo="http://www.w3.org/1999/XSL/Format";
                                xmlns:lxslt="http://xml.apache.org/xslt";
                                >
                                
  <xsl:template match="doc">
      <xsl:variable name="copies" select="/doc/copies" />
          <xsl:for-each select="$copies/copy">
                <xsl:value-of select="." />
          </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>
-------------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" 
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                                xmlns:fo="http://www.w3.org/1999/XSL/Format";
                                xmlns:lxslt="http://xml.apache.org/xslt";
                                >
                                
  <xsl:template match="doc">
      <xsl:variable name="copies">
             <xsl:value-of select="/doc/copies" />
          </xsl:variable>
          <xsl:for-each select="$copies/copy">
                <xsl:value-of select="." />
          </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>

Reply via email to