RE: [xsl] Can I print well-formed XML/HTML in text output mode

Subject: RE: [xsl] Can I print well-formed XML/HTML in text output mode
From: "Andreas L. Delmelle" <a_l.delmelle@xxxxxxxxxx>
Date: Sun, 26 Oct 2003 12:47:27 +0100
> -----Original Message-----
> From: Nathaniel Stoddard
>
> When I do the <xsl:value-of select="my_node" /> then it just does a messy
> output.  If "my_node" is "<p>Hey, this stupid thing won't work right</p>"
> then it will proceed to print "Hey, this stupid thing won't work
> right".  As

Actually, the stupid thing *is* working right if my_node is the p-node :)

> fun as that is, it doesn't look too nice later when it shows up on a
> webpage.  (I can't just put the <p> and </p> around the thing because the
> data in the node is PCDATA, so any html can be in there.)  I'd
> like a simple
> value-of statement, but apparently that's a no-go since it is in text mode
> and text mode will take the text only in all the descendent
> nodes, and leave
> out the tags.
>

Use <xsl:copy-of select="my_node" /> for this.

Hope this helps!

Cheerz,

Andreas


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


Current Thread