[Home] [By Thread] [By Date] [Recent Entries]
Alain Gilbert wrote:
I have the simplified stylesheet that follows this message. I have a problem with the usage of the "addInlineText" template which simply tries to copy the nodes defined at the call site. It is also important to apply-template on the copied nodes to further apply transformations defined elsewhere. The error tells you that you have a result tree fragment that needs to be converted into a node-set. With the result tree fragment you can only do xsl:copy-of or xsl:value-of. You can use the exsl:node-set function for converting the result tree fragment into a node-set: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:html="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="html"> Add xmlns:exsl="http://exslt.org/common" here on the xsl:stylesheet element. And then you will probably want to list the prefix exsl in the exclude-result-prefixes attribute as well. <xsl:template name="addInlineText"> <xsl:param name="value" /> <xsl:for-each select="$value" >
-- Martin Honnen http://msmvps.com/blogs/martin_honnen/
|

Cart



