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

Re: method='text' ... whitespace problems

Subject: Re: method='text' ... whitespace problems
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 18 Nov 2002 16:33:04 GMT
whitespace in dos
Typically I'm using

<xsl:template match="element">
&nl;[begin thisLabel: ]





well you've got two newlines there, one after the > and one inside the
entity ref. unless you really want two newlines it would be simpler to
go


<xsl:template match="element">
[begin thisLabel: ]


XSLT1 is delightfully quiet about newlines in text output (XSLT2 is more
explict and usefully states that #10 characters will, as in xml output, 
produce a system specific line end).

However xslt1 is silent so if you are on dos and want to generate a crnl
pair then you probably have to use
<xsl:text>&#10;&#13;</xsl:text>
as your 
<xsl:text>
</xsl:text>
is equivalent to
<xsl:text>&#10;</xsl:text>
even if the file has dos line ends as teh xml parser normalises all line
endings to #10 on the way in.

The xslt2 wording allows the text serialiser to write out
<xsl:text>&#10;</xsl:text>
as a #10 #13 pair if it is on DOS but I don't think teh XSLT1 wording
really lets the system do that.


David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 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.