[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Preserve HTML formatting when apply-templates in

Subject: Re: Preserve HTML formatting when apply-templates in variabl
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 6 Aug 2004 09:50:47 +0100
xsl entity preserve
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.