RE: [xsl] Special Characters in URLs

Subject: RE: [xsl] Special Characters in URLs
From: "Christopher R. Maden" <crism@xxxxxxxxx>
Date: Tue, 19 Jun 2001 16:02:34 -0700
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, "¡Hola!";); (b) the encoding you're getting now; (c) the encoding you'd like to get; and (d) the XSLT engine you're using.

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

XSL-List info and archive:

Current Thread