This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: $string + 'string' in one line
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] $string + 'string' in one line
- From: Ingo Schildmann <ingoschi at web dot de>
- Date: Wed, 23 May 2001 13:25:30 +0200
- References: <20010523123931.B8112@sokrates.mimuw.edu.pl>
- Reply-To: xsl-list at lists dot mulberrytech dot com
On Wednesday 23 May 2001 12:39, you wrote:
> <xsl:variable name="root_dir" select="'/cocoon/awk'"/>
> <xsl:variable name="styles_dir">
> <xsl:copy-of select="$root_dir"/>/styles
> </xsl:variable>
>
> <xsl:template match="body">
> <link rel="stylesheet" type="text/css" href="{$styles_dir}/{@style}.css"/>
> </xsl:template>
>
> produces:
> <link rel="stylesheet" type="text/css" href="/cocoon/awk
> /styles/simple.css"/>
>
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.
--
Ingo Schildmann ingoschi@web.de
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list