Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Whitespace Problem from XSL

I am converting an XML file outputted from a RecordSet
into an HTML page suitable as a report, and am having
trouble preserving the whitespace within a node - it
keeps geeting stripped out.

This involves a record, "Full Description", that can
include lightly formatted text to include skipped lines,
indentations, etc. I am certain that the XML file
generated from the RecordSet includes the whitespace, but
the XSL transformation keeps stripping it out.

Here is the abbreviated template. Can someone help me
with the correct attribute or processing instruction to
get the desired result?

<xsl:template match='z:row'>
<TABLE BORDER="1" CELLPADDING="2" CELLSPACING="0">
<TR>
<TH HEIGHT="50"
COLSPAN="2">Revision Number</TH>
<TD HEIGHT="50" COLSPAN="2"
ALIGN="Center" VALIGN="Middle">
<xsl:value-of
select="@RevNumber"/>
</TD>
</TR>
<TR>
<TH COLSPAN="4">Change
Summary</TH>
</TR>
<TR>
<TD COLSPAN="4">
<xsl:value-of
select="@ChangeSummary"/>
</TD>
</TR>
<TR>
<TH COLSPAN="4">Full
Description</TH>
</TR>
<TR>
<TD COLSPAN="4">
<xsl:value-of
select="@FullDescription"/>
</TD>
</TR>
</TABLE>
<P></P>
<P></P>
<P></P>
</xsl:template>

Thanks,

David Jellison
jellison_da@hotmail.com
[1618 byte] By [David Jellison] at [2007-11-9 15:26:39]