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

RE: plain text output

Subject: RE: plain text output
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 18 Jul 2002 09:09:41 +0100
xsl plain text newline
> 1. Preventing initial first lines.
> 
> This template will print a blank first line.
> 
> <xsl:template>
> PDS_VERSION_ID          = PDS3
> RECORD_TYPE             = FIXED_LENGTH
> </xsl:template>
> 
> Something like this will not.
> 
> <xsl:template>
> <xsl:text/>PDS_VERSION_ID          = PDS3
> RECORD_TYPE             = FIXED_LENGTH
> </xsl:template>
> 
> But this breaks one of the features of xsl that I like, that 
> it can look 
> like the document it is mean to output.

Well, when I look at your first example, I see a newline before the
text.
> 
> 2. Inserting a carriage return.
> 
> Simarly, putting in a bunch of
> <xsl:text>&#13;</xsl:text>
> elements disrupts the stylesheet.
> 
> Is there any easier way to do it? 
> 
Not really. Producing formatted text output is definitely a little
tricky. I make a rule to always include literal text in <xsl:text>
elements. Or sometimes I write

<xsl:text/>Here is a line of <xsl:value-of select="xxxx"/>
text.&_#xa;<xsl:text/>

I generally output newlines using an &_#xa; character reference, rather
than relying on copying a newline from the stylesheet. So each line
appears in an <xsl:text> element and ends with an &_#xa;. (Underscores
inserted to bypass "clever" mail software)

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


 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.