|
Subject: Re: [xsl] Result tree fragment to string? From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Thu, 28 Aug 2008 12:31:27 +0200 |
The above doesn't handle namespaces, processing-instructions,comments,or mixed content, but it could be hacked to do so. Is there a reason why this approach would not work in XSL 1.0 to satisfy his needs?Yes, the reason is that you can't do the apply-templates on the result tree fragment, you would first need to convert it to a node-set with an extension function.
Oops, I thought his result tree was a node set, not a string...
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:variable name="rtf">
<html>
<body>
<p>Example</p>
</body>
</html>
</xsl:variable>
<xsl:apply-templates select="$rtf" mode="m1"/>
</xsl:template> <xsl:template match="/" mode="m1">
<xsl:copy-of select="."/>
</xsl:template>Martin Honnen http://JavaScript.FAQTs.com/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Result tree fragment to s, Houghton,Andrew | Thread | Re: [xsl] Result tree fragment to s, Andrew Welch |
| Re: [xsl] Dynamic web pages using S, Andrew Welch | Date | RE: [xsl] Using variables in xpath , Vasu Chakkera |
| Month |