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

Re: Escaping newlines in an XSL file

Subject: Re: Escaping newlines in an XSL file
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 4 Jun 2002 13:12:38 -0600 (MDT)
escaping newlines in xml
ROBERTS Jeff wrote:
> > My problem is that if I break up the second line in the above code so that
> > there is one element per line  (for readability)
> > 
> > e.g.
> > 
> >   <xsl:value-of select="child::ELEMENT_1"/>,
> >   <xsl:value-of select="child::ELEMENT_2"/>,
> >    ...
> >   <xsl:value-of select="child::ELEMENT_n"/>
> > 
> > Then XSL will output the newlines found after each comma to the resulting
> > file.
> > 
> > Does anyone know a way I can break up the line above without having XSL
> > treat the New Lines as significant ?

You can do it this way:

<xsl:value-of select="ELEMENT_1"/><xsl:text>,</xsl:text>

or use the Tennison method, where xsl:text is essentially a no-op:

<xsl:value-of select="ELEMENT_1"/>,<xsl:text/>

Note you don't need to specify the child:: axis, as that is the default.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 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.