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

RE: Stripping spaces with XSL

  • From: Michael Fitzgerald <mike@w...>
  • To: Raphael Hertzog <rhertzog@h...>, xml-dev@l...
  • Date: Wed, 16 May 2001 15:59:16 -0700

xsl strip spaces
To normalize space in element-name, try normalize-space(): [1]

<xsl:value-of select="normalize-space(element-name)"/>

Normalization of space removes leading and trailing whitespace and smashes
sequences of more than one whitespace into a single space.

Good luck,
-Mike

p.s. try  http://www.mulberrytech.com/xsl/xsl-list for XSLT questions

[1] http://www.w3.org/TR/xpath#section-String-Functions

-----Original Message-----
From: Raphael Hertzog [mailto:rhertzog@h...]
Sent: Wednesday, May 16, 2001 3:09 PM
To: xml-dev@l...
Subject: Stripping spaces with XSL


Hi,

I want to strip all spaces (ie each sequence of spaces get into a single
space and trailing spaces are removed). I'm using the xsl:ouput element to
tell that I want to use the "text" output method. And I use the
xsl:strip-space element to tell on which element space should be stripped.

Despite this I still get uncessary spaces in the output. Both with xalan
(java version) and xsltproc (aka libxslt from Daniel Veillard used by
Gnome).

What did I miss ?

Cheers,

PS: Xalan-java is version 2.0.1. xsltproc is 0.9.0.
--
Raphaël Hertzog -+- http://strasbourg.linuxfr.org/~raphael/
Le bouche à oreille du Net : http://www.beetell.com
Naviguez sans se fatiguer à chercher : http://www.deenoo.com
Formation Linux et logiciel libre : http://www.logidee.com

------------------------------------------------------------------
The xml-dev list is sponsored by XML.org, an initiative of OASIS
<http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: xml-dev-request@l...


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.