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

RE: newline headaches in text output

Subject: RE: newline headaches in text output
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Thu, 24 Jun 2004 10:06:56 -0400
msxml newline
> From: Butler Adam [mailto:abutler@xxxxxxxxx] 

> I am currently attempting to generate delimited text files 
> from XML source documents using XSL.  When I perform the 
> transformation I get extra newlines at the beginning of the 
> target document.  I have read through the FAQ and the topic: 
> "text output method, and newline problems", while relevant 
> didn't provide me with a solution.  I have included a simple 
> xml object and a simple xsl sheet.  Any advice would be 
> greatly appreciated.

This request is a good example of why people should say what processor
they  used, and how they used it to generate the results.  I tried this
transformation using some half dozen xsl processors, including oldish
versions of saxon, xalan, sablotron, and msxml.  None of these put an
extra line at the start of the output.  I did this in an old version of
XML Cooktop (I use the old version because its user interface is better
than the newer version).

Usually, if you are getting extra lines or whitespace, the first thing
to try is to take out all extra line breaks from the stylesheet. This
makes the stylesheet hard to read but you can usually recover most of
the readability later.

So you could try changing from your original

	<xsl:template match="people">
      	<xsl:for-each select="person">

To this

<xsl:template match="people"><xsl:for-each select="person">

Or as a more readable variation, 

<xsl:template match="people"
   ><xsl:for-each select="person">

But based on my results, try another processor instead.

Cheers,

Tom P

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.