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: Special Characters in URLs


At 09:00 19-06-2001, Eriksson Magnus wrote:
>Thanks for the help, Chris.

You're quite welcome.

>Yes, the URIs are interpreted by the Web Server/Web browser but I need them
>to be generated correctly by the XSLT processor -- to comply with the
>HTTP-standard (e.g. no white space in URLs). Is there a way to achieve this?

I'm afraid that now I'm confused.  I thought you said that the XSLT 
processor *was* handling special characters correctly, by hex-escaping 
them?  (Mike Brown's message had a very nice, more detailed, description of 
the process.)

If you want the URLs escaped in a standard way (hex-encoded UTF-8 octets), 
use the HTML output method and an intelligent XSLT engine (this is what I 
thought you were already doing).

If you don't want the URLs escaped at all, don't use the HTML output 
method; generate XHTML using the XML output method (and maybe then massage 
the content back into HTML, if necessary).

If you want the URLs escaped but in a non-standard way (e.g., hex-encoded 
ISO 8859-1 octets), you'll need to handle it yourself, either by a named 
recursive template (see Jeni Tennison's site for some hints) or by a call 
out to a function library.

I hope this helps.  If not, please give an example again of (a) the 
unencoded URL (e.g., to borrow from Mike's example, 
"http://www.example.com/cgi-bin/foo.pl?greeting=¡Hola!";); (b) the encoding 
you're getting now; (c) the encoding you'd like to get; and (d) the XSLT 
engine you're using.

-Chris
-- 
Christopher R. Maden, XML Consultant
DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
<URL: http://crism.maden.org/consulting/ >
PGP Fingerprint: BBA6 4085 DED0 E176 D6D4  5DFC AC52 F825 AFEC 58DA


 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]