RE: excess whitespace

Subject: RE: excess whitespace
From: "Robert C. Lyons" <boblyons@xxxxxxxxxx>
Date: Fri, 16 Jul 1999 10:57:12 -0400
Chris writes: 
	"In short, I'm gaining newlines where none are 
	indicated in my stylesheet."


I suspect that the extra line terminators are coming
from your XML document. Try stripping the white
space from your XML doc (using the default-space="strip"
attribute in the stylesheet element) and using the
text instruction to output the line terminators.

For example:

<?xml version="1.0"?>
    indent-result="no" default-space="strip">

<xsl:template match="/">
<xsl:apply-templates />

<xsl:template match="record">
<xsl:value-of select="field_1" /><xsl:text>&#9;</xsl:text>
<xsl:value-of select="field_2" /><xsl:text>&#9;</xsl:text>
<xsl:value-of select="field_3" /><xsl:text>&#xD;&#xA;</xsl:text>


Caveat emptor: I didn't test the example.

Hope this helps.


Bob Lyons
EC Consultant
Unidex Inc.


Current Thread