You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Carsten Ziegeler <cz...@sundn.de> on 2001/07/05 14:07:54 UTC

[Xalan-J 2.2.0D6]: Problems with normalize-space

Hi,

I have some problems with the normalize-space function.
When I use the following rule, everything is working well:

<xsl:template match = "link">
	<a href="{normalize-space(url)}">
		<xsl:value-of select="normalize-space(text)"/>
	</a>
</xsl:template>

However if I use the folling template the result is different,
a %20 is appended to the value of the href attribute:

<xsl:template match = "link">
	<a>
		<xsl:attribute name="href"><xsl:value-of
select="normalize-space(url)"/></xsl:attribute>
		<xsl:value-of select="normalize-space(text)"/>
	</a>
</xsl:template>

The source looks like this:

<link>
	<url>
		value
	</url>
</link>

Is there any chance to get the second template working?


Carsten

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de
================================================================



Re: [Xalan-J 2.2.0D6]: Problems with normalize-space

Posted by Gary L Peskin <ga...@firstech.com>.
This is fixed in the latest CVS version.

Gary

Carsten Ziegeler wrote:
> 
> Hi,
> 
> I have some problems with the normalize-space function.
> When I use the following rule, everything is working well:
> 
> <xsl:template match = "link">
>         <a href="{normalize-space(url)}">
>                 <xsl:value-of select="normalize-space(text)"/>
>         </a>
> </xsl:template>
> 
> However if I use the folling template the result is different,
> a %20 is appended to the value of the href attribute:
> 
> <xsl:template match = "link">
>         <a>
>                 <xsl:attribute name="href"><xsl:value-of
> select="normalize-space(url)"/></xsl:attribute>
>                 <xsl:value-of select="normalize-space(text)"/>
>         </a>
> </xsl:template>
> 
> The source looks like this:
> 
> <link>
>         <url>
>                 value
>         </url>
> </link>
> 
> Is there any chance to get the second template working?
> 
> Carsten
> 
> Open Source Group                        sunShine - b:Integrated
> ================================================================
> Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> www.sundn.de                          mailto: cziegeler@sundn.de
> ================================================================