cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: &amp; in url [WAS: file generator error]
Date Wed, 15 Jan 2003 01:58:54 GMT
Geoff Howard wrote:
> I would regard the behavior below to be incorrect - so the million 
> dollar question is what is the correct behavior:  
> 
> Can GET parameters be separated by &amp; instead of 
> & according to the W3C, etc?

I don't think so. & is the delimiter, not &amp;. What is when amp; is 
really needed? &amp; is only the escaped & in XML and HTML. So if you 
write an <a href=""/> there must be &amp; in theory, but it's parsed as 
&. If you use & in href, it's only the "intelligence" of the browser to 
not interpret it as starting of an entity. But in the URL itself, it 
must be &, not &amp;

BNC for HTTP URL syntax 
(http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1738.html):

httpurl = "http://" hostport [ "/" hpath [ "?" search ]]
hpath = hsegment *[ "/" hsegment ]
hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
search = *[ uchar | ";" | ":" | "@" | "&" | "=" ]

Nothing about &amp;, only & in "search".

Regards,

Joerg

> Don't have time to look it up myself - does anyone know for sure?
> 
> Geoff
> 
> 
>>-----Original Message-----
>>From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
>>Sent: Tuesday, January 14, 2003 3:14 PM
>>To: cocoon-users@xml.apache.org
>>Subject: Re: file generator error
> 
> 
> <snip/>
> 
>>If I type 
>>http://127.0.0.1:8080/cocoon/joerg/test?test=test&amp;test2=test2 I get 
>>(IMO also) expected
>>
>><requestParameters>
>>   <parameter name="amp;test2">
>>     <value>test2</value>
>>   </parameter>
>>   <parameter name="test">
>>     <value>test</value>
>>   </parameter>
>></requestParameters>
>>
>>because & as delimiter for the parameters (not &amp;), so amp; must be 
>>the beginning of the next parameter name. 


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message