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

Re: White space control when formatting for ascii text

Subject: Re: White space control when formatting for ascii text
From: Tony Graham <tgraham@xxxxxxxxxxxxxxxx>
Date: Tue, 17 Oct 2000 16:43:07 -0400 (EST)
whitespace ascii
At 17 Oct 2000 15:29 -0400, Rick Anderson wrote:
 > I'm attempting to transform some xml into nicely formatted ascii style
 > text instead of to html.  I've been using tabs to align my columns but
 > sometimes I get extra tabs. I don't know why.
 > 
 > It seems to be very difficult to control the white space in the style
 > sheet.  Is there a way to make the white space more visibile for better
 > debugging? 

Your problem isn't with the stylesheet, it's with your data.

The <xsl:strip-space elements="*"/> in your stylesheet strips any
whitespace-only text nodes in your XML, but your XML has several text
nodes that end with a line feed and some spaces or a tab:

 >       <desc>Global unique identifier for a person.
 >       </desc>

Either put the end tags after the last printing character:

         <desc>Global unique identifier for a person.</desc>

or, in your stylesheet, normalize the spaces in your <desc> elements
to both remove leading and trailing whitespace and collapse multiple
spaces between words into single spaces:

<xsl:template match="desc">
  <xsl:value-of select="normalize-space()"/>
</xsl:template>

Regards,


Tony Graham
======================================================================
Tony Graham                            mailto:tgraham@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9632
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================



 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.