[xsl] <xsl:attribute name="href"> formatting problem

Subject: [xsl] <xsl:attribute name="href"> formatting problem
From: "Bianca Poignee" <bianca_p@xxxxxx>
Date: Thu, 6 May 2004 20:25:47 +0200 (MEST)
I have a weird formatting problem with my XSL script output... :-(

I am using MSXML 4.0 and >IE5.5.

My script should generate an anchor with a call to a javascript function
that needs a string parameter. 

<xsl:element name="a"><xsl:attribute
name="href">javascript:myFunc('<xsl:value-of
select="$var1"/>')</xsl:attribute>Link</xsl:element>

The current value of var1 contains the german umlaut for "a" and some &#160;
characters ("Fig.&#160;2&#160;Struktur ausw#a#hlen" where the #a# is the
german umlaut)

If I do the transformation like written above, my result is as follows:
Fig.%C2%A01%C2%A0Struktur ausw%C3%A4hlen

BUT! If I use a different attribute name (like "test" instead of "href"),
then my string doesn't get formattet like this, but the result is:
Fig. 1   Struktur ausw#a#hlen

How can I reach a formatting that doesn't come with "%C2%A0" and all that
stuff when using "href"? My javascript would need to decode all of them
manually otherwise.. ;-)

Thanks for any help,
Bianca from Germany

-- 
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info

Current Thread