[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] : Escaping '&' in an HTML link.
Subject: RE: [xsl] : Escaping '&' in an HTML link. From: "Clapham, Paul" <pclapham@xxxxxxxxxxxxx> Date: Mon, 30 Jul 2001 14:45:21 -0700 |
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@xxxxxxxxxx] Sent: July 30, 2001 14:03 To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] : Escaping '&' in an HTML, Robert C. Lyons | Thread | RE: [xsl] : Escaping '&' in an HTML, Mark Feblowitz |
[xsl] Usage of SourceLocator in Tra, Ellango Rajagopalan | Date | RE: [xsl] : Escaping '&' in an HTML, Mark Feblowitz |
Month |