PDA

View Full Version : HTML Transform - Output Step Ignoring CRLF


mvermeulen
09-21-2007, 03:15 PM
I have the output of a Subversion log going to standard output. When I perform a Transform XML step the carriage return/line feeds appear to be ignored and the output runs together.

Do you know if this is an xslt issue or something specific to the transform step?

Thanks.....

kinook
09-24-2007, 07:22 AM
CR/LF chars in the step output carry through to the HTML file in our tests (note that newlines are normally treated as whitespace (http://www.w3.org/TR/html401/struct/text.html#h-9.1) rather than line breaks (http://www.w3.org/TR/html401/struct/text.html#line-breaks) in browsers, but TransformLog.xslt puts step output within PRE (http://www.w3.org/TR/html401/struct/text.html#edef-PRE) tags to force newlines to be processed as line breaks).

Please ZIP and send or post:
1) The info from Help | About | Install Info
2) The .bld file
3) A build log file (XML and HTML)
4) The browser brand+version used to view the log file

Thanks.

mvermeulen
09-24-2007, 07:44 AM
The <pre> tags actually did the trick! I have been using a modified version of this for couple of years and had not looked at the standard transform for quite some time.

Below is a section of the xslt with the <pre> tags now added...

<xsl:for-each select="$BuildStatusFilter">
<xsl:for-each select="step[@action='Subversion']">
<xsl:if test="name='Subversion Log'">
<tr>
<td class="NormalBold">:</td>
<td class="Normal">
<pre><xsl:value-of select="output"/></pre>
</td> </tr> </xsl:if>
</xsl:for-each> </xsl:for-each>

Thanks!