Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Cleaning up a string so I can output it >Thread Next - Re: Cleaning up a string so I can output it Re: Cleaning up a string so I can output itTo: NULL Date: 7/23/2009 1:29:00 PM Dylan wrote:
>>> <td onclick="document.getElementById
>>> ('results').innerHTML='{$testresult}'"><a name="{$testname}"
> <testcase name="test_Actions" time="39" assertions="1">
> <failure type="Test::Unit::AssertionFailedError" message="Failed:
> Actions Test Asset not found in search....">
> Failed: Actions Test Asset not found in search.
> <true> expected but was
> <"Actions Test Asset not found in search">.
> (Test::Unit::AssertionFailedError)
> P:/Tests/RunAll/deciphertest.rb:90:in `test_Actions' </failure>
> </testcase>
>
> What happens when I click on the appropriate error is, well, nothing.
> Nothing on screen changes, the text that is in place that is supposed
> to change is the same as it was before.
Does IE not at least display a script error?
I suspect that the line breaks in the element content result in script
errors as you use a JavaScript string literal and that can't contain
line breaks.
So you need to escape them when you construct the JavaScript code.
There is also a single quote in the element context and that also needs
to be escaped to not break the JavaScript syntax.
Here is an example that escapes line breaks and single quotes:
http://home.arcor.de/martin.honnen/xslt/test2009072301Xsl.xml
Test XML using that stylesheet:
http://home.arcor.de/martin.honnen/xslt/test2009072301.xml
Works fine for me with IE 8.
--
Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
