[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Using copy-of to grab child nodes


Subject: [xsl] Using copy-of to grab child nodes
From: "Austin, Darrel" <Darrel.Austin@xxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Nov 2006 14:18:41 -0600

I have xhtml in my xml document. So, it looks like this:

<item>
<title>title</title>
<text><p><strong>my text</strong></p></text>
</item>

In my xslt I want to grab all the HTML in the text node and just spit it
out (as HTML).

To do that, I'm using this:

<xsl:copy-of select="text[child::*]" />

Which, I'm guessing, is wrong, as it's actually writing out the '<text>'
itself. <My rendered HTML looks like this:

<h1>Title</h1>
<text><p><strong>my text</strong></p></text>

Can anyone fix my syntax to get rid of the 'text' nodes?

Also, is this list appropriate for asking about ASP.net code in the
context of using it to create and transform XML?

-Darrel


Current Thread
Keywords