Removing line feeds from xsl

posted by Bryan on

After upgrading to the latest version of CruiseControl.NET (1.4.4.83), and then inserting the custom xsl back in, I could not expand the details to view the test results.

We use CruiseControl.NET to gather statistics of our WatiN/NUnit tests. We had some custom XSL inserted into the default tests.xsl to add additional statistics to the NUnit Details page on CruiseControl.NET.

After upgrading to the latest version of CruiseControl.NET (1.4.4.83), and then inserting the custom xsl back in, I could not expand the details to view the test results. I kept getting an error that "eDiv is null". After troubleshooting it, I found that each ID had a line feed that prevented the toggleDiv javascript function to get each element specifically by ID. In other words, the line feed got in the way and the details wouldn't expand.

So, I inserted:

<xsl:template match="/text"><xsl:value-of select="normalize-space()"></xsl:value-of></xsl:template>
at the top of the page and it did the trick. That was more convenient than putting it in more than 5 locations.

Leave a comment

blog comments powered by Disqus