You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Dmitri Ilyin <dm...@memiq.com> on 2001/02/23 09:36:26 UTC

strange behavior src atribute of tag in stylesheet

Hi *!
 
I have a strange behavior with xalan 2j.
 
I have one very simple stylesheet in attachement and one xml file.
 
The problem is:
 
In stylesheet I have <img> tag with src attribute.
The uri in src attribute is url encoded.
<IMG alt="Direkt Anlage Bank"
src="/DoxEP/%3C%3Fxml%3F%3E%3CdoxRef%3E%3CdoxId%3Edab_depotauszug_icon.gif%3
C/doxId%3E%3CownerId%3E0010013949445127%3C/ownerId%3E%3C/doxRef%3E"
width="25%" heigth="25%"/>

after processing in output file all "%" signes in my src uri will be
exchanged with "%25" sequence.

More strange is that if I rename attribute from "src" to something else,
"sr" for example, the problem disappear.

Any ideas???

regards

Dmitri

 

 


Re: strange behavior src atribute of tag in stylesheet

Posted by Holger Flörke <fl...@doctronic.de>.
Hi Dimitri,

   the problem is related with a bug I have posted in this list 
("HTML-Output encoding URL") for Xalan-C++ 1.1. If Xalan schould produce 
HTML output, it tries to encode URL links in <IMG src"..."> and <A 
HREF="...">. This has to be done, because not all characters are allowed in 
the URL (you have encoded the characters on your own). The percent sign is 
one reserved character in an URL. Xalan should encode the percent sign, 
only if the percent sign does not start an encoded character. The check for 
this is done in Xalan-C++ by checking whether the next two characters are 
digits. This is wrong, because character encoding is done with hex-digits 
(and you have a hex letter in every encoded character). I have changed 
Xalan-C++ not to encode any percent character. Maybe another one in the 
list can give you a hint to do this in java.

HolgeR


At 09:36 23.02.01 +0100, you wrote:
>Hi *!
>
>I have a strange behavior with xalan 2j.
>
>I have one very simple stylesheet in attachement and one xml file.
>
>The problem is:
>
>In stylesheet I have <img> tag with src attribute.
>The uri in src attribute is url encoded.
>
><IMG alt="Direkt Anlage Bank" 
>src="/DoxEP/%3C%3Fxml%3F%3E%3CdoxRef%3E%3CdoxId%3Edab_depotauszug_icon.gif%3C/doxId%3E%3CownerId%3E0010013949445127%3C/ownerId%3E%3C/doxRef%3E" 
>width="25%" heigth="25%"/>
>
>after processing in output file all "%" signes in my src uri will be 
>exchanged with "%25" sequence.
>
>More strange is that if I rename attribute from "src" to something else, 
>"sr" for example, the problem disappear.
>
>Any ideas???
>
>regards
>
>Dmitri


-- 
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