|
Subject: RE: [xsl] Result tree fragment to string? From: "Garriss Jr., James P." <jgarriss@xxxxxxxxx> Date: Wed, 27 Aug 2008 13:54:06 -0400 |
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.j.welch@xxxxxxxxx]
Sent: Wednesday, August 27, 2008 12:09 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Result tree fragment to string?
2008/8/27 Garriss Jr., James P. <jgarriss@xxxxxxxxx>:
> 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/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Result tree fragment to s, Andrew Welch | Thread | RE: [xsl] Result tree fragment to s, Wendell Piez |
| RE: [xsl] Result tree fragment to s, Houghton,Andrew | Date | Re: [xsl] Result tree fragment to s, Martin Honnen |
| Month |