looking at your original post, I see that I misunderstood what you meant by
'text of a node'. in XML, text is stuff that isn't inside an element or
comment. what you wanted was a textual representation of an element i.e.
with the angle brackets in.
The angle bracket notation is something that is used to serialise XML so
that it can be saved or viewed, but programs that process XML (including the
XSLT processor) don't see the angle brackets when doing the processing; they
are working with a tree of nodes. The angle brackets are only added on at
the end if you're using an output method that requires them.
So what I'm sating is that if you want to include a piece of serialized XML
in the output document you'll have to do it yourself. something like:
<xsl:template match="Doc/*">
<xsl:element name="MyOutput">
<xsl:attribute name="XML">
<
<xsl:value-of select="name()"/>
<xsl:for-each select="@*">
<xsl:value-of select="name()"/> = "<xsl:value-of
select="text()/>"
>
</xsl:attribute>
</xsl:element>
</xsl:template>
this is untested but I think it should give you the idea
Andy
"Kevin Burges" <ke***@burieddreams.com> wrote in message
news:3f*********************@news.frii.net...
Unfortunately not, I already tried that. For some reason nothing comes
through in the attribute if I do <copy-of>. I just end up with an empty
attribute.
I'm guessing copy-of outputs a nodeset rather than a string, hence you
can't stick it into an attribute value.
Any other ideas?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!