[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Stripping spaces with XSL
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|