Subject: Re: [xsl] Preserve HTML formatting when apply-templates in variabl From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Fri, 6 Aug 2004 09:50:47 +0100 |
Hi Karl, > The variable which should retrieve the HTML from the matched > template is "ui_review". The template "review" is responsible for > generating the HTML. I suspect that in your ui_content template you're doing: <xsl:value-of select="$content" /> The <xsl:value-of> instruction gives you the "string value" of whatever you select; in the case of a result tree fragment (such as $ui_review), this is a concatenation of all the text nodes in the result tree fragment. What you see is the HTML you generated but with all the tags stripped. Instead, do: <xsl:copy-of select="$content" /> This gives you a copy of the result tree fragment, including all the element and attribute nodes that it contains. What you see is the HTML that you generated. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Preserve HTML formatting , Michael Kay | Thread | [xsl] RETAINING THE ENTITY NAMES IN, Arul Kumar |
Re: [xsl] RETAINING THE ENTITY NAME, David Carlisle | Date | Re: [xsl] Replace Special Character, David Carlisle |
Month |