Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
XML
XSL : unwanted carriage returns/white space
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="StopBsod, post: 771000"] Hello group, I use XSLT to output a unix shell script based on the content of an XML file : The XSLT : <xsl:stylesheet xmlns:xsl="[URL]http://www.w3.org/1999/XSL/Transform[/URL]" version="1.0"> <xsl:output method="text"/> <xsl:template name="haut" match="/rhythmdb"> #!/bin/bash cd /pub/html/zicmu2/links <xsl:for-each select="entry"> <xsl:sort select="location"/> ln -s "<xsl:value-of select="substring-after(location,'file://')"/>" <xsl:choose> <xsl:when test="starts-with(location,'file:///pub/joe/misc')"> "<xsl:value-of select="substring(location, 22)"/>" </xsl:when> <xsl:otherwise> "<xsl:value-of select="substring(location, 19)"/>" </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template> </xsl:stylesheet> After conversion (with xsltproc/libxml) #!/bin/bash cd /pub/html/zicmu2/links ln -s "data1" "to_data1" ln -s "data2" "to data2" So I have many unwanted carriage returns/whitspaces. (it follows the indentation of my .XSL...) I googled around and saw <xsl:text> ? Didn't work 'cause my XML file has unsupported char. Help Welcomed. Thks. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
XML
XSL : unwanted carriage returns/white space
Top