RE: amp; in url [WAS: file generator error]

2003-01-15 Thread Sylvain.Thevoz
Joerg,

I found the same as you if I type the URL in my browser.

But in my case the problem is that the URL will be parsed through an XML parser.

If I type  the XML parser returns me this error:
An error occurred 
The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode notifies that 
org.apache.cocoon.ProcessingException says:
The reference to entity c must end with the ';' delimiter. 

More precisely:
org.apache.cocoon.ProcessingException: Failed to load sitemap from 
file:/C:/jakarta-tomcat-4.1.12/webapps/cocoon/woc/portal-fw/sitemap.xmap: 
file:/C:/jakarta-tomcat-4.1.12/webapps/cocoon/woc/portal-fw/sitemap.xmap:168:70:org.xml.sax.SAXParseException:
 The reference to entity c must end with the ';' delimiter. 


And If I type amp; the XML parser doesn't return an error but the link isn't 
correct anymore because it uses amp; instead of .

Sylvain

-Message d'origine-
De: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
Date: mardi, 14. janvier 2003 21:14
À: [EMAIL PROTECTED]
Objet: Re: file generator error


Hello Geoff,

If I type http://127.0.0.1:8080/cocoon/joerg/test?test=testtest2=test2 
in Mozilla URL textbox I get expected

requestParameters
   parameter name=test2
 valuetest2/value
   /parameter
   parameter name=test
 valuetest/value
   /parameter
/requestParameters

If I type 
http://127.0.0.1:8080/cocoon/joerg/test?test=testamp;test2=test2 I get 
(IMO also) expected

requestParameters
   parameter name=amp;test2
 valuetest2/value
   /parameter
   parameter name=test
 valuetest/value
   /parameter
/requestParameters

because  as delimiter for the parameters (not amp;), so amp; must be 
the beginning of the next parameter name. But I think, that's not the 
problem. The only one is the replacing of the character reference amp; 
with the character  done by the XML parser. And as I only can point out 
it works for me as shown below. Why, Sylvain, aren't you simply trying 
the same? Afterwards a simple look in the core.log shows the correct 
resolving of amp; or not.

Regards,

Joerg

Geoff Howard wrote:
 don't remember seeing a bug fix related to this, but that could be it - I
 use a cvs version of 2.1 from early december (12/7 I think).  Joerg, do you
 get the result I do on the request generator example (Sylvain too)?
 
 Geoff
 
-Message d'origine-
De: Joerg Heinicke [mailto:[EMAIL PROTECTED]]

Hello Geoff and Sylvain,

I can't confirm a bug using Cocoon 2.1 dev from CVS (2003-01-07).

Using this sitemap snippet

map:match pattern=test
   map:generate
src=http://www.moreover.com/cgi-local/page?o=xmlamp;c=Virus%20wa
rnings/
   map:serialize type=xml/
/map:match


DEBUG   (2003-01-13) 16:48.59:984   [core.manager] (/cocoon/joerg/test)
Thread-9/SourceResolverImpl: Resolving
'http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings' with
base 'file:/D:/xml/' in context 'file:/D:/Tomcat/bin/'
DEBUG   (2003-01-13) 16:48.59:984   [core.manager] (/cocoon/joerg/test)
Thread-9/SourceResolverImpl: Resolved to systemID
'http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings'
DEBUG   (2003-01-13) 16:48.59:984   [core.manager] (/cocoon/joerg/test)
Thread-9/SourceResolverImpl: Making URL from
http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings


-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]


-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: amp; in url [WAS: file generator error]

2003-01-15 Thread Joerg Heinicke
Hi Sylvain,

yes, we lost the original posting a bit ;-)

[EMAIL PROTECTED] wrote:

Joerg,

I found the same as you if I type the URL in my browser.


Nice to hear.


But in my case the problem is that the URL will be parsed through an
XML parser.

If I type  the XML parser returns me this error: An error occurred
 The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode
notifies that org.apache.cocoon.ProcessingException says: The
reference to entity c must end with the ';' delimiter.

More precisely: org.apache.cocoon.ProcessingException: Failed to load
sitemap from
file:/C:/jakarta-tomcat-4.1.12/webapps/cocoon/woc/portal-fw/sitemap.xmap:
file:/C:/jakarta-tomcat-4.1.12/webapps/cocoon/woc/portal-fw/sitemap.xmap:168:70:org.xml.sax.SAXParseException:
The reference to entity c must end with the ';' delimiter.


That's clear, it must be so.  means here starts an entity. And in 
contrast to most HTML browsers an XML parser doesn't try to add the 
obviously missing ';'.

And If I type amp; the XML parser doesn't return an error but the
link isn't correct anymore because it uses amp; instead of .


And here you are wrong. The link *is* correct then. Similar to HTML 
(e.g. a href=/) you *must* escape  to amp; (HTML browsers only try 
to solve the problem themselves, if they find an  without ;). And as 
you can see below in the quoted message I had it working (amp; is 
resolved to ). Try to add this little snippet into the sitemap (only 
map:generate + map:serialize), test it, have a look into the core.log 
and tell me, what's wrong with your Cocoon version. Maybe you test a 
newer one, if there was really a bug in the resolving, but I don't 
assume so.

Regards,

Joerg

-Message d'origine- De: Joerg Heinicke
[mailto:[EMAIL PROTECTED]]

Hello Geoff and Sylvain,

I can't confirm a bug using Cocoon 2.1 dev from CVS (2003-01-07).


Using this sitemap snippet

map:match pattern=test map:generate 
src=http://www.moreover.com/cgi-local/page?o=xmlamp;c=Virus%20wa
 rnings/ map:serialize type=xml/ /map:match


DEBUG   (2003-01-13) 16:48.59:984   [core.manager]
(/cocoon/joerg/test) Thread-9/SourceResolverImpl: Resolving 
'http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings'
with base 'file:/D:/xml/' in context 'file:/D:/Tomcat/bin/'
DEBUG (2003-01-13) 16:48.59:984   [core.manager]
(/cocoon/joerg/test) Thread-9/SourceResolverImpl: Resolved to systemID 
'http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings'
 DEBUG   (2003-01-13) 16:48.59:984   [core.manager]
(/cocoon/joerg/test) Thread-9/SourceResolverImpl: Making URL from
 http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings


-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: amp; in url [WAS: file generator error]

2003-01-15 Thread Sylvain.Thevoz
Hi Joerg,

Your snippet works well for me (with amp;)!

So, if I'm right this means that it isn't a bug but a problem in my code!?

= I have found that it was a matcher problem in my sitemap!
Now it works!


Thank you all for you help
Sylvain



-Message d'origine-
De: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
Date: mercredi, 15. janvier 2003 10:47
À: [EMAIL PROTECTED]
Objet: Re: amp; in url [WAS: file generator error]


Hi Sylvain,

yes, we lost the original posting a bit ;-)

[EMAIL PROTECTED] wrote:
 Joerg,
 
 I found the same as you if I type the URL in my browser.

Nice to hear.

 But in my case the problem is that the URL will be parsed through an
 XML parser.
 
 If I type  the XML parser returns me this error: An error occurred
  The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode
 notifies that org.apache.cocoon.ProcessingException says: The
 reference to entity c must end with the ';' delimiter.
 
 More precisely: org.apache.cocoon.ProcessingException: Failed to load
 sitemap from
 file:/C:/jakarta-tomcat-4.1.12/webapps/cocoon/woc/portal-fw/sitemap.xmap:
 
file:/C:/jakarta-tomcat-4.1.12/webapps/cocoon/woc/portal-fw/sitemap.xmap:168:70:org.xml.sax.SAXParseException:
 The reference to entity c must end with the ';' delimiter.

That's clear, it must be so.  means here starts an entity. And in 
contrast to most HTML browsers an XML parser doesn't try to add the 
obviously missing ';'.

 And If I type amp; the XML parser doesn't return an error but the
 link isn't correct anymore because it uses amp; instead of .

And here you are wrong. The link *is* correct then. Similar to HTML 
(e.g. a href=/) you *must* escape  to amp; (HTML browsers only try 
to solve the problem themselves, if they find an  without ;). And as 
you can see below in the quoted message I had it working (amp; is 
resolved to ). Try to add this little snippet into the sitemap (only 
map:generate + map:serialize), test it, have a look into the core.log 
and tell me, what's wrong with your Cocoon version. Maybe you test a 
newer one, if there was really a bug in the resolving, but I don't 
assume so.

Regards,

Joerg

 -Message d'origine- De: Joerg Heinicke
 [mailto:[EMAIL PROTECTED]]
 
 Hello Geoff and Sylvain,
 
 I can't confirm a bug using Cocoon 2.1 dev from CVS (2003-01-07).
 
 
 Using this sitemap snippet
 
 map:match pattern=test map:generate 
 src=http://www.moreover.com/cgi-local/page?o=xmlamp;c=Virus%20wa
  rnings/ map:serialize type=xml/ /map:match
 
 
 DEBUG   (2003-01-13) 16:48.59:984   [core.manager]
 (/cocoon/joerg/test) Thread-9/SourceResolverImpl: Resolving 
 'http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings'
 with base 'file:/D:/xml/' in context 'file:/D:/Tomcat/bin/'
 DEBUG (2003-01-13) 16:48.59:984   [core.manager]
(/cocoon/joerg/test) Thread-9/SourceResolverImpl: Resolved to systemID 
 'http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings'
  DEBUG   (2003-01-13) 16:48.59:984   [core.manager]
 (/cocoon/joerg/test) Thread-9/SourceResolverImpl: Making URL from
  http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings


-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]


-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: amp; in url [WAS: file generator error]

2003-01-15 Thread Joerg Heinicke
Nice to hear that you finally got it to work. Let's end the thread ;-)

Joerg

[EMAIL PROTECTED] wrote:

Hi Joerg,

Your snippet works well for me (with amp;)!

So, if I'm right this means that it isn't a bug but a problem in my code!?

= I have found that it was a matcher problem in my sitemap!
Now it works!


Thank you all for you help
Sylvain

-Message d'origine-
De: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
Date: mercredi, 15. janvier 2003 10:47
À: [EMAIL PROTECTED]
Objet: Re: amp; in url [WAS: file generator error]


Hi Sylvain,

yes, we lost the original posting a bit ;-)

[EMAIL PROTECTED] wrote:


Joerg,

I found the same as you if I type the URL in my browser.



Nice to hear.



But in my case the problem is that the URL will be parsed through an
XML parser.

If I type  the XML parser returns me this error: An error occurred
The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode
notifies that org.apache.cocoon.ProcessingException says: The
reference to entity c must end with the ';' delimiter.

More precisely: org.apache.cocoon.ProcessingException: Failed to load
sitemap from
file:/C:/jakarta-tomcat-4.1.12/webapps/cocoon/woc/portal-fw/sitemap.xmap:
file:/C:/jakarta-tomcat-4.1.12/webapps/cocoon/woc/portal-fw/sitemap.xmap:168:70:org.xml.sax.SAXParseException:
The reference to entity c must end with the ';' delimiter.



That's clear, it must be so.  means here starts an entity. And in 
contrast to most HTML browsers an XML parser doesn't try to add the 
obviously missing ';'.


And If I type amp; the XML parser doesn't return an error but the
link isn't correct anymore because it uses amp; instead of .



And here you are wrong. The link *is* correct then. Similar to HTML 
(e.g. a href=/) you *must* escape  to amp; (HTML browsers only try 
to solve the problem themselves, if they find an  without ;). And as 
you can see below in the quoted message I had it working (amp; is 
resolved to ). Try to add this little snippet into the sitemap (only 
map:generate + map:serialize), test it, have a look into the core.log 
and tell me, what's wrong with your Cocoon version. Maybe you test a 
newer one, if there was really a bug in the resolving, but I don't 
assume so.

Regards,

Joerg


-Message d'origine- De: Joerg Heinicke
[mailto:[EMAIL PROTECTED]]

Hello Geoff and Sylvain,

I can't confirm a bug using Cocoon 2.1 dev from CVS (2003-01-07).


Using this sitemap snippet

map:match pattern=test map:generate 
src=http://www.moreover.com/cgi-local/page?o=xmlamp;c=Virus%20wa
rnings/ map:serialize type=xml/ /map:match


DEBUG   (2003-01-13) 16:48.59:984   [core.manager]
(/cocoon/joerg/test) Thread-9/SourceResolverImpl: Resolving 
'http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings'
with base 'file:/D:/xml/' in context 'file:/D:/Tomcat/bin/'
DEBUG (2003-01-13) 16:48.59:984   [core.manager]
(/cocoon/joerg/test) Thread-9/SourceResolverImpl: Resolved to systemID 
'http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings'
DEBUG   (2003-01-13) 16:48.59:984   [core.manager]
(/cocoon/joerg/test) Thread-9/SourceResolverImpl: Making URL from
http://www.moreover.com/cgi-local/page?o=xmlc=Virus%20warnings

--

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: amp; in url [WAS: file generator error]

2003-01-15 Thread Geoff Howard
 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;


Sorry for being an idiot.  amp; is valid in the html as delimeter, but the
browser should take it out so that
a
href=http://localhost:8080/cocoon/samples/system/request.html?foo=baramp;f
ee=fitest/a
sends you to:
http://localhost:8080/cocoon/samples/system/request.html?foo=barfee=fi
with the unescaped ampersand.

The reason I was confused was because I remembered a problem I encountered
in the past with amp; as the delimeter in html being passed through, but I
believe the problem there was more complicated - javascript was passing the
amp; literally IIRC.

Mea Culpa,
Geoff


-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: amp; in url [WAS: file generator error]

2003-01-15 Thread J.Pietschmann
Geoff Howard wrote:

Sorry for being an idiot.  amp; is valid in the html as delimeter, but the
browser should take it out so that

...

The reason I was confused was because I remembered a problem I encountered
in the past with amp; as the delimeter in html being passed through, but I
believe the problem there was more complicated - javascript was passing the
amp; literally IIRC.


You are in dire need to read the HTML and XML specs
at W3C and get rid of the mental baggage of the Tag
Soup approach early browsers imposed on unsuspecting
users.
If you want to have an ampersand in user data transported
in any HTML or XML document, like the Cocoon site map,
you have to escape it as amp;. Proper HTML and XML parsers
will deliver an ampersand to the application. Those nasty
exceptions introduced in JavaScript embedded in HTML are
actually bugs which sloppy developers who don't even know
where to find specs got used to.

J.Pietschmann


-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: amp; in url [WAS: file generator error]

2003-01-14 Thread Joerg Heinicke
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:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 3:14 PM
To: [EMAIL PROTECTED]
Subject: Re: file generator error



snip/


If I type 
http://127.0.0.1:8080/cocoon/joerg/test?test=testamp;test2=test2 I get 
(IMO also) expected

requestParameters
  parameter name=amp;test2
valuetest2/value
  /parameter
  parameter name=test
valuetest/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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: amp; in url [WAS: file generator error]

2003-01-14 Thread Joerg Heinicke
But that's in the HTML code I guess, not in the URL textarea. And there 
this behaviour is more or less correct. It tries to read quoteId, 
something *must* be wrong here. Now the browser can choose between amp; 
or quot;. But what's the user's wanted? IE chooses quot;. Maybe the 
guys at MS don't even know explicit this choosing, because it's really a 
special case. The error is the not-escaping of  in the href attribute 
or whereever (HTML code), so it has nothing to do with the syntax of the 
URL itself.

Regards,

Joerg

Todd Pierce wrote:
(I don't know about W3C, but) Yes, it can. I have been forced to use amp;
in the past where IE was resolving GET parameters to escape characters, even
though the semi colon was missing. In my case I had a parameter called
quoteId, so the request 
...?abc=123quoteId=456 became ...?abc=123eId=456

Changing the request to ...?abc=123amp;quoteId=456 fixed it just fine.

WIll anecdotal evidence do?



-Original Message-
From: Geoff Howard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 15 January 2003 11:27 AM
To: [EMAIL PROTECTED]
Subject: amp; in url [WAS: file generator error]


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?

Don't have time to look it up myself - does anyone know for sure?

Geoff


-Original Message-
From: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 3:14 PM
To: [EMAIL PROTECTED]
Subject: Re: file generator error



snip/


If I type 
http://127.0.0.1:8080/cocoon/joerg/test?test=testamp;test2=test2 I get 
(IMO also) expected

requestParameters
  parameter name=amp;test2
valuetest2/value
  /parameter
  parameter name=test
valuetest/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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: amp; in url [WAS: file generator error]

2003-01-14 Thread McNeil, Shane
Title: RE: amp; in url [WAS: file generator error]





I don't know if this will help but here's a link to a w3c appendix dealing with this issue
http://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2


It suggests that the  *must* be escaped as amp; or #38;


This article http://ppewww.ph.gla.ac.uk/~flavell/www/formgetbyurl.html has an extended discussion.


Regards,


Shane McNeil
Analyst Programmer
Corporate Document Technologies
STANDARDS AUSTRALIA



 (I don't know about W3C, but) Yes, it can. I have been forced to use amp;
 in the past where IE was resolving GET parameters to escape characters, even
 though the semi colon was missing. In my case I had a parameter called
 quoteId, so the request 
 ...?abc=123quoteId=456 became ...?abc=123eId=456
 
 Changing the request to ...?abc=123amp;quoteId=456 fixed it just fine.
 
 WIll anecdotal evidence do?
 



-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]