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

Backward compatibility with 1.1 "Cannot convert a #RESULT_TREE_FRAG to a node set"

           Summary: Backward compatibility with 1.1 "Cannot convert a
                    #RESULT_TREE_FRAG to a node set"
           Product: XalanC
           Version: 1.3.x
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: XalanC
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


In Xalan-C version 1.1 executing following template had no problem at all.

<xsl:variable name="test">
        <fake>
                <xsl:copy-of select="XPath-expression-here"/>
        </fake>
</xsl:variable>
<xsl:variable name="node-set" select="$test"/>
<xsl:copy-of select="$node-set"/>
<xsl:value-of select="count($node-set)"/>       

The key part is selecting variable $test into variable $node-set. While type of 
$test is result-tree-fragment type of $node-set is node-set, so executing count
($node-set) was ok. 

But in version 1.3 this wasn't help. The type of $node-set is still result-tree-
fragment and count($node-set) or <xsl:for-each select="$node-set/*"/> produces 
an error "Cannot convert a #RESULT_TREE_FRAG to a node set". 

This is not a problem according to XSLT 1.0 Specification. But looking at XSLT 
WD 1.1 we can see that result-tree-fragment is completely replaced by node-set.

So for me this change between Xalan versions 1.1 and 1.3 is step backward. For 
the moment I'll keep working with Xalan version 1.1 but it is good idea to get 
this feature back in new releases.

Reply via email to