<xsl:copy-of select="text/*" />
Your original expression selects any <text> nodes which have child
nodes, and copy-of in that case would include the <text> node as well as
its children.
Also, is this list appropriate for asking about ASP.net code in the
context of using it to create and transform XML?
I don't think it's technically off-topic, but you may get a better
response on one of the XML-specific over at MSDN.
Cheers,
b.
-----Original Message-----
From: Austin, Darrel
[mailto:Darrel(_dot_)Austin(_at_)courts(_dot_)state(_dot_)mn(_dot_)us]
Sent: Monday, November 20, 2006 1:19 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Using copy-of to grab child nodes
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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--