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

Re: Formatting text to include html tags...?

Subject: Re: Formatting text to include html tags...?
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 5 Nov 2001 10:18:39 +0000
include html
Hi Ragulf,

> Is there a way that I can do this? The solution should also enable
> newline (<br/>) tags, if possible.

It looks as though you want to use xsl:copy-of (which makes a deep
copy of whatever nodes you select, including elements) rather than
xsl:value-of (which gives the string value of a node, and doesn't
retain any structure). Try:

<xsl:template match="/">
                        <xsl:copy-of select="Test/node()" />

You need Test/node() rather than just Test because if you copied the
Test element, you'd get the Test element itself as well as its
descendants. With Test/node() you get a copy of the content of the
Test element without the Test element itself.

I hope that helps,


Jeni Tennison

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.