[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: excess whitespace

Subject: Re: excess whitespace
From: Christopher Conway <chris_conway@xxxxxxxxxxxx>
Date: Fri, 16 Jul 1999 12:17:43 -0400
christopher conway
Your suggestion worked. Thank you.

But there were absolutely no line terminators within any of
the elements in my XML document, so I don't understand where
they were coming from.

Chris

"Robert C. Lyons" wrote:
> 
> Chris writes:
>         "In short, I'm gaining newlines where none are
>         indicated in my stylesheet."
> 
> Chris,
> 
> 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"?>
> <xsl:stylesheet
>     xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
>     indent-result="no" default-space="strip">
> 
> <xsl:template match="/">
> <xsl:text>FIELD1&#9;FIELD2&#9;FIELD3&#xD;&#xA;</xsl:text>
> <xsl:apply-templates />
> </xsl:template>
> 
> <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>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> Caveat emptor: I didn't test the example.
> 
> Hope this helps.
> 
> Bob
> 
> ------
> Bob Lyons
> EC Consultant
> Unidex Inc.
> 1-732-975-9877
> boblyons@xxxxxxxxxx
> http://www.unidex.com/
> 
>   --------------------------------------------------------------------------------
> 
>    Part 1.2    Type: application/ms-tnef
>            Encoding: base64

-- 
chris_conway@xxxxxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.