![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Xslt removing spaces? Xslt removing spaces?To: NULL Date: 1/25/2008 6:24:00 AM
Hello All:
We are using an xslt to format xml and transform it into html. Some of the
nodes in the xml are filled with spaces (the xml is from a mainframe and is
providing us with data for a web page report). The xml is formatted as such:
<RespinseXml>
<Records>
<Record>blah blah blah</Record>
<Record>blah blah blah</Record>
<Record> </Record>
<Record> </Record>
<Record>blah blah blah</Record>
<Record>blah blah blah</Record>
</Records>
<?RespinseXml>
The empty lines are supposed to be blank lines in the report, but they are
being dropped. Here is the xslt:
<xsl:template match="/">
<h1>Rating Worksheet</h1>
<xsl:apply-templates select="Records"/>
</xsl:template>
<xsl:template match="Records">
<pre>
<xsl:for-each select="record">
<xsl:value-of select="."/><br/>
</xsl:for-each>
</pre>
</xsl:template>
</xsl:stylesheet>
We use the html <pre> tags to retain the formatting provided by the
mainframe (so that columns line up). I thought that the html <pre> tag would
preserve the spaces. Does someone know what might cause the spaces to be
dropped?
TIA,
--
Joe
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
