Re: XSLT/XPATH problem, possible bug

Martin Honnen <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Liberty Development
Message-ID <[email protected]>
Michael Hansen wrote:
> I found the problem!
> 
> When the xsl stylesheet link in the xml contains several arguments, 
> seperated by &amp; (as recommended by w3c), firefox gags on it. I tried 
> base64 encoding the whole argumentset so only one argument is used, and then 
> reverse process that later on, it works.
> 
> So the question is, should firefox be able to handle a stylesheet link like 
> this:
> 
> <?xml-stylesheet type="text/xsl" 
> href="xsl.php?arg1=value&amp;arg2=value&amp;arg3=value" version="1.0"?>
> 
> If it should, there's obviously something wrong with firefox, because all 
> arguments after arg1 is ignored.


Good question, without checking any XML specs I would think that any '&' 
in the data of a processing instruction needs to be escaped as '&amp;' 
the way you have it and that any XSLT processor then interpreting the 
href pseudo attribute of xml-stylesheet needs to unescape '&amp;' to '&' 
before making a HTTP request with a URL.
Only at least two XML parsers do not seem to complain about an unescaped 
'&' in a pi target so I am not sure my opinion above is correct.
I will try to find details in the XML specification.


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.