[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Result tree fragment to string?
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: 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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|