This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Bug in treating an RTF by Saxon 6.5 and MSXML
- From: michael dot h dot kay at ntlworld dot com
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 17 May 2002 4:49:14 +0000
- Subject: Re: [xsl] Bug in treating an RTF by Saxon 6.5 and MSXML
- Reply-to: xsl-list at lists dot mulberrytech dot com
Here's the template with the offending lines again:
<xsl:template match="str-split2words-func:*">
<xsl:param name="arg1" select="/.."/>
<xsl:param name="arg2"/>
<!--Right--> <xsl:copy-of select="vendor:node-set($arg1)/*[1]"/>
<!--Err--> <xsl:copy-of select="$arg1/word[position() != last()]"/>
Dimitre, you have discovered a feature in Saxon which I have never advertised. The saxon:node-set() function really does convert an RTF to a node set. That's right, it doesn't create a node-set that is a copy of the RTF, it really changes the RTF into a node-set, so once you have called saxon:node-set($rtf) you can thereafter use $rtf as a node-set.
(In fact, saxon:node-set() simply unsets the bit that says "the user isn't allowed to do useful things with this tree").
It might seem a very un-functional way of doing things, but it's perfectly conformant, because extension functions are allowed to have side-effects.
Michael Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list