This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: [Fwd: %20 in href attribute]
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: Yan Yi Huang <yanyi dot huang at avercom dot net>
- Cc: XSL-List at lists dot mulberrytech dot com
- Date: Wed, 23 Jan 2002 12:02:20 +0000
- Subject: Re: [xsl] [Fwd: %20 in href attribute]
- Organization: Jeni Tennison Consulting Ltd
- References: <3C4DCCA8.4090307@avercom.net>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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