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]

RE: : Escaping '&' in an HTML link.


You're correct, the HTTP rules require you to escape an "&" character.  Just
as you replaced each space by "+", you need to replace each "&" by "%26".
This would mean that you would have to call a template to do this
replacement before sending the translated string to the output, since there
is no built-in support for URL encoding in XSLT.  However, I believe you may
find that code in the EXSLT project, which you can access via
http://www.exslt.org/, under the name of str:replace.

PC2

-----Original Message-----
From: Aparna Joshi [mailto:aparna.joshi@Dejima.com]
Sent: July 30, 2001 14:03
To: 'xsl-list@lists.mulberrytech.com'
Subject: [xsl] : Escaping '&' in an HTML link.


Hello,

Here is my stylesheet (basic structure):

</snip>

But this link fails when it encounters a value with "&" in it e.g.
Star&Bucks fails because of the '&' in between.
Is there any to escape the '&' so that the URL is completely and properly
formed?
I tried "disable-output-escaping" but it didnot seem to work.

Thanks in anticipation for any help provided.

Aparna

 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]