Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Cleaning up a string so I can output it

From: Martin Honnen <mahotrash@-----.-->
To: 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.
> &lt;true&gt; expected but was
> &lt;&quot;Actions Test Asset not found in search&quot;&gt;.
> (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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent