Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Xslt removing spaces?

From: Joe@-----------.---------.---
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


transparent
Print
Mail
Digg
delicious
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