If I were simply outputting the contents of the variable, then yes,
this
would be fine. But I want to do some string processing first, so no, I
don't think this is what I need.
Here's a contrived example that demonstrates what I need:
<xsl:variable name="rtf">
<html>
<body>
<div class="alpha">Alpha</div>
<div class="bravo">Bravo</div>
<div class="alpha">Alpha</div>
</body>
</html>
</xsl:variable>
I need to send this variable, $rtf, to a named template, where I intend
to
eliminate the redundant <div>. Note that I have been forbidden to dork
with
the variable code itself; someone else maintains it. (Have I mentioned
that
my development environment is constricting?)
James Garriss
http://garriss.blogspot.com
-----Original Message-----
From: Andrew Welch [mailto:andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com]
Sent: Wednesday, August 27, 2008 12:09 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Result tree fragment to string?
2008/8/27 Garriss Jr., James P. <jgarriss(_at_)mitre(_dot_)org>:
I have a variable that contains a result tree fragment of HTML code.
I
need to convert the result tree fragment to a string. The string
must
not only include the text node values but the HTML element names and
attributes as well.
Does:
<xsl:copy-of select="$var"/>
...do what you need? If not post back with an example because it's
not that clear what you are after...
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
--~------------------------------------------------------------------
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>
--~--