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" [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | ------- Additional Comments From [EMAIL PROTECTED] 2002-08-03 11:25 ------- I'm completely agree that result of conversation in Xalan 1.1 is not what is expected but i find a way to use it. Let me describe my problem in details. My application uses two kind of XSL transforamtion depending on client browser. Server side (based on Xalan) or client side (if the clent is Micro$oft IE 5.5 or later). This kind of solution helps to reduce the load of the server and not in last place to increese the speed. M$XSLT is vastly faster. No offence ;-). Obviously stylesheets have to be written in the way to be compatible with both transformers. So i need RTF variable to be converted to a node-set variable. <xsl:variable name="node-set" select="$test"/> This does the job in MS XSLT (in the same way as nodeset() function in Xalan 1.3) and with some adjustments in Xalan 1.1. Following your advice to use nodeset() extention i have to write something like <xsl:variable name="nodes-tmp"> <xsl:choose> <xsl:when test="function-available('xalan:nodeset')"><xsl:copy- of select="xalan:nodeset($test)"/></xsl:when> <xsl:otherwise><xsl:copy-of select="$test"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="nodes" select="$nodes-tmp"/> unfortunately this cannot help me :-( First the nodes-tmp variable will be again RTF and second <xsl:copy-of select="xalan:nodeset($test)"/> causes 'No clone of a document fragment! (, line -1, column -1)' error. The other solution is to use something like <xsl:choose> <xsl:when test="function-available('xalan:nodeset')"> <xsl:variable name="nodes" select="xalan:nodeset($test)"/> <the-rest-of-template/> </xsl:when> <xsl:otherwise> <xsl:variable name="nodes" select="$test"/> <the-rest-of-template/> </xsl:otherwise> </xsl:choose> but then i have to duplicate the <the-rest-of-template/> what will cost me dificulties with maintenance of the duplicated code (which is quite complicated as you can expect). I've tested this situation on Ginger Alliance's Sablotron 0.95 and it behaves excactly as MS XSLT. I still preffer to use Xalan because it is 30-50% faster than Sablotron but because of this situation i can't upgrade to 1.3 :-(. btw during the tests i found that Xalan 1.3 allows me to do <xsl:variable name="nodes" select="$test"/> <xsl:variable name="nodes" select="xalan:nodeset($test)"/> defining same variable twice in the same scope is not allowed. I can post this as new bug because it has nothing to do with previous discussion
