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

Re: $string + 'string' in one line

Subject: Re: $string + 'string' in one line
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Wed, 23 May 2001 14:58:01 +0100
copy of xslt one line

Ingo Schildmann wrote:
> 
> 
> The declaration of styles_dir seems to be the problematic part that produces
> the unwanted whitespace including the linebreak.
> I'm not absolutely sure why $styles_dir contains a linebreak,
> (imho a linebreak should occur after styles and any whitespace between
> <xsl:variable> and <xsl:copy-of> would be stripped),
> but the declaration with xsl:copy-of is unusual anyway.
> 
> <xsl:variable name="styles_dir" select="concat($rootdir,'/styles')" />
> would avoid any unwanted whitespace in styles_dir.
> 
A good solution, better than the obvious:

<xsl:variable name="styles_dir">
	<xsl:copy-of select="$root_dir"/>/styles<xsl:text/>
</xsl:variable>

which should put the "/styles" into its own text node. Since the
following carriage return and spaces before the "</xsl:variable>" are
now in *their* own text node, they should now get stripped. "A text node
is never stripped unless it contains only whitespace characters."
(http://www.w3.org/TR/xslt.html#strip) 

Francis.

 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.