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

Answer to question -- Striping whitespace with LotusXSL

Subject: Answer to question -- Striping whitespace with LotusXSL
From: "Garriss Jr.,James P." <jgarriss@xxxxxxxxx>
Date: Wed, 13 Oct 1999 13:01:02 -0400
Answer to question -- Striping whitespace with LotusXSL
At 03:14 PM 10/11/99 , you wrote:
I'm using LotusXSL and have these included in my XSL stylesheet:

<xsl:output method="text" indent="no"\>
<xsl:strip-space elements="*"/>

The resulting text output file still has all the whitespace from my XSL stylesheet. Anyone know how to get rid of it? TIA,

Much thanks to Scott Boag of Lotus for figuring out what I needed to do.


In my stylesheet, I was outputting text characters like such:

  </xsl:if>
  //
</xsl:template>

I was only intending to output the double slashes, but the whitespace leading and trailing the slashes were also being output to my resulting text file. There are two fixes:

1) enclose the output in text elements, like this:

  </xsl:if>
  <xsl:text>//</xsl:text>
</xsl:template>

2) use variables, like this:

[set global variable]
<xsl:variable name="double_slash" select="'//'"/>

[reference it in template]
  </xsl:if>
  <xsl:value-of select="$double_slash"/>
</xsl:template>

Hope you find this useful,

James Garriss | The MITRE Corporation | jgarriss @ mitre.org


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.