This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fwd: %20 in href attribute]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]