Re: [xsl] [Fwd: %20 in href attribute]

Subject: Re: [xsl] [Fwd: %20 in href attribute]
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2002 12:02:20 +0000
Hi Yan,

> When use a variable with string value, which contains spaces after
> the #, as the value of href attribute to the <a> tag, the
> transformer automatically replaces the spaces with %20 and causes
> the link not recognize the anchor in the targeting page. Is there a
> work around for that?

Out of interest, which browsers don't recognise the %20 in the
fragment identifier (the bit after the #)?

There might be processors out there that don't escape spaces (since
the XSLT 1.0 Rec actually only says that non-ASCII characters should
be escaped, and spaces are ASCII characters), so it might be worth
looking at some other processors to see what they do.

---

For interest, in XSLT 2.0, there's a escape-uri-attributes attribute
on xsl:output that enables you to control whether URI attributes are
escaped at all when using the HTML or XHTML output methods. However,
this would affect all the escaping, not just the escaping of spaces.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread