![]() |
| Result tree fragments Xsltp.pl Perl XSLT processor converts all result tree fragments to node-sets. Empty result tree fragment is converted to empty node-set (not empty string). This method does not lead to any kind of problems and also eliminates the necessity of the following trick for empty node-set declaration <xsl:variable name="some" select="/.."/> The result tree fragment with content is converted to the node-set consisting of just a root node of the result tree fragment. You won't encounter any problems with existing XSLT programs since the node-set is converted to string exactly as it is required. The following code fragment <xsl:apply-templates select="$treefragment"/> results always in infinite loop! It is true for any XSLT parser. You must use either the mode attribute or select a particular element of the tree fragment, e. g <xsl:apply-templates select="$treefragment/someelement"/> |