You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Holger Flörke <fl...@doctronic.de> on 2001/02/21 11:09:37 UTC
HTML-Output encoding URL
Choosing HTML output the content of the "href" attribute in the "a" element
should be encoded by the XSLT-Processor. The brackets "[" and "]" should be
enconded as mentioned in the rfc 2396. Xalan-C does not do this job. Ok I
am familiar with encoding theese characters on my own with "%5B" and "%5D"
but xalan-c will escape the percent sign and produces "%255B" and "%255D".
He does this masquerading only for the brackets and not for any other
character coded by hand. Am I wrong, or is Xalan-C wrong? How to work
around the problem resulting in a correct encoded URL? I have attached a
sample stylesheet and the result with Xalan-C++ 1.1 on Win32. tia
HolgeR unwise = "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`" Data
corresponding to excluded characters must be escaped in order to be
properly represented within a URI.
--> http://foo.org/me?link=//*%5B%40id=%275%27%5D
http://foo.org/me?link=//*[@id='5'] Result: -------
--
holger floerke d o c t r o n i c
email floerke@doctronic.de information publishing + retrieval
phone +49 (0) 2222 9292 90 http://www.doctronic.de
fax +49 (0) 2222 9292 99
xsl ques - is a value contained in a node of elements?
Posted by chris markiewicz <cm...@commnav.com>.
hello.
a little background...i am passing back workflow objects and a list of
workflow-person associations (for a given person).
example:
<workflow>
<wfid>5</wfid>
...
</workflow>
...
and
<wfperassoc><wfid>5</wfid><perid>100</perid></wfperassoc>
<wfperassoc><wfid>6</wfid><perid>100</perid></wfperassoc>
...
when i get to a workflow (id=5), i want to see if that person (id = 100) is
associated. is there any function that handles this sort of thing?
thanks
chris
Re: HTML-Output encoding URL
Posted by Holger =?iso-8859-1?Q?Fl�rke?= <fl...@doctronic.de>.
Sorry for this badly formatted email :^( I found the bug on my own.
I found a bug in Xalan-C++ 1.1. The FormatterToHTML class quotes some
characters double in writeAttrURI. I have heard about a bug-tracking system
for xalan and found the one at "http://nagoya.betaversion.org/bugzilla/" Is
it the right place? The new XalanC-Version (1.1) is not entered, so I will
use this forum to place the bug-report
Chosing HTML-Output causes the Xalan to quote illigal characters in an
"href" attribute of an element "a". If there are quoted characters in it,
the leading percent sign may be quoted. (%5D -> %255D)
file: FormatterToHTML.cpp
class: FormatterToHTML
method: writeAttrURI
line : 963-966
if (i + 2 < len &&
XalanXMLChar::isDigit(string[i + 1]) == true &&
XalanXMLChar::isDigit(string[i + 2]) == true)
{
accumContent(ch);
}
The test is on not quoting double on quoted chars. Because the quoting is
done with hex (allowing 'a..f' and 'A..F'), there could be characters to.
HolgeR
--
holger floerke d o c t r o n i c
email floerke@doctronic.de information publishing + retrieval
phone +49 (0) 2222 9292 90 http://www.doctronic.de
fax +49 (0) 2222 9292 99