Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Cleaning up a string so I can output it Cleaning up a string so I can output itTo: NULL Date: 7/21/2009 2:53:00 PM Hey there! I have a problem I've been wrestling with for a while and
wondered if anyone might be able to help.
I have an XML file of output from a Ruby script and I'm writing up a
style sheet to parse it for me. Right now I have most of it done;
multiple tables for different parts of the output, listing all the
data, etc... But I'm having a problem with getting some output to
write correctly. I have a CSS <style> defined that lets me give text a
popup window that I can use to display more info about a certain item.
Currently it's working perfectly. The info includes all sorts of
characters, including "<", ">", "'", etc... but it show up fine in the
pop ups. However, I'm trying to get that exact same data to show up
permanently when someone clicks on the text so that they can copy-
paste it if they need to, and I am unable to get the exact same data
that works so well in the popup to show up in plain text.
Here's the relevant code:
<tr>
<xsl:variable name="testname" select="substring-after
(@name,'test_')" />
<xsl:variable name="testresult" select="failure "/>
<td><xsl:value-of select="$testname"/></td>
<td />
<td onclick="document.getElementById
('results').innerHTML='{$testresult}'"><a name="{$testname}"
class="info" href="#{$testname}"><xsl:value-of select="failure/
@message"/><span><xsl:value-of select="failure"/></span></a></td>
</tr>
and then farther down the page:
<td>
<span id="results">Click on an error or failure and its details
will be printed here</span>
</td>
The "<xsl:value-of select="failure"/>" "<span><xsl:value-of
select="failure"/></span>" works to get the data for the popup, but
the "<xsl:variable name="testresult" select="failure "/>" followed by
"innerHTML='{$testresult}'" doesn't.
Any ideas would be greatly appreciated. Thanks!
-Dylan
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
