[xslt] uri escaping in html output, redux
- From: Ivan Kurmanov <kurmanov openlib org>
- To: xslt gnome org
- Subject: [xslt] uri escaping in html output, redux
- Date: Tue, 4 Jan 2005 12:16:09 +0200
Hi Sirs,
Before I start, let me thank you all for a great software
you do and wish you all a good new year.
I found at least two discussions of this issue in the past:
Libxslt escaping urls when outputting HTML by Andy Hird
http://mail.gnome.org/archives/xslt/2002-September/msg00006.html
Output escaping (again!) by Bruce Miller
http://mail.gnome.org/archives/xslt/2003-March/msg00020.html
(These are the initial messages in respective threads.)
I'm writing this to confirm that:
- developers understand that current libxslt behaviour in
this regard violates RFC 2396 "Uniform Resource
Identifiers (URI): Generic Syntax";
- for compatibility, this is not going to be fixed.
Is this correct?
I think (just as Bruce Miller, see second of the mentioned
threads) that Libxslt violates section 2.4.2 of the RFC:
2.4.2. When to Escape and Unescape
A URI is always in an "escaped" form, since escaping or
unescaping a completed URI might change its semantics.
Normally, the only time escape encodings can safely be
made is when the URI is being created from its component
parts; each component may have its own set of characters
that are reserved, so only the mechanism responsible for
generating or interpreting that component can determine
whether or not escaping a character will change its
semantics. Likewise, a URI must be separated into its
components before the escaped characters within those
components can be safely decoded.
...
http://www.ietf.org/rfc/rfc2396.txt
Stylesheet author only knows when and what part of URI to
escape.
My particular problem is that I can't make libxslt generate
<a href=""> construct with "+" character in the href
attribute value. I need it for the query part of the URI:
href="http://some.site/script?argument+another" and I get
href="http://some.site/script?argument%2Banother" instead,
which is a different URL.
If there is any kind of workaround to this problem, I'll be
happy to know about it. Thank you.
Ivan Kurmanov
http://ahinea.com/en/
working on http://acis.openlib.org/ open-source project
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]