You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Steve Burling <sr...@umich.edu> on 2006/06/17 02:38:31 UTC

Cocoon config: chasing namespace URIs?

A couple of days ago, a test Cocoon site of mine stopped working.  After a 
great deal of experimentation, head scratching, rebooting, cursing, etc., I 
think I've figured out what's wrong, but my diagnosis doesn't make sense.

To make a long story short, the machine running the site has apparently 
lost the ability to contact www.w3.org.  Of the half a dozen other machines 
on our network that I tested, all except the problem machine could contact 
www.w3.org, and aren't exhibiting any problems.

The only references to that site that I've found are in namespace 
definitions like these:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:c-insert="http://apache.org/cocoon/insert"
	xmlns:xhtml="http://www.w3.org/1999/xhtml">

I'm not an XML expert; I just run the sites for the folks who are, but my 
limited understanding of namespace definitions leads me to believe that it 
is the *value* of the attribute, not what it points to, that matters, and 
in fact <http://www.w3.org/1999/XSL/Transform> (for example) is just a 
simple web page that doesn't look like it'd be useful to an XSLT processor 
in any way.

So, the question:  *Is* Cocoon attempting to de-reference that URI?  And if 
so, is there a knob somewhere I can turn to make it stop?

More details can be provided if they'd help.  This has failed from the 
problem machine with both Cocoon 2.1.7 and 2.1.9, and works from various 
other machines running various flavors of Cocoon.

-- 
Steve Burling                                    <ma...@umich.edu>
University of Michigan, ICPSR                    Voice: +1 734 615.3779
330 Packard Street                               FAX:   +1 734 647.8700
Ann Arbor, MI 48104-2910

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


Re: Cocoon config: chasing namespace URIs?

Posted by Steve Burling <sr...@umich.edu>.
--On June 17, 2006 10:35:42 AM -0500 Igor Naumov <ig...@hotmail.com> 
wrote:

> It might be possible  that your  application  is going to w3.org for some
> DTD (e.g. for XML/XHTML validation).
> However I am not sure how to prevent this (or even if it make sense to
> avoid retrieving a DTD).

To which I reply:

I think that you're right (and thanks for the pointer!).  The error being 
flagged by Cocoon was on this line:

		<xsl:apply-templates select="$layoutTemplate/*"/>

and the template file being referenced contains a DOCTYPE with a DTD 
referencing w3.org.

Our production web site's static content is of course riddled with DOCTYPEs 
like that, but when w3.org becomes unreachable it doesn't seem to cause 
problems for the Apache-served content, only for stuff that Cocoon is 
serving up.  So I see really only two ways to avoid this problem:

    - Change all the DOCTYPE references to a local copy of the DTD
    - Figure out how to keep Cocoon from trying to validate the XHTML (if
      that's what's really going on)

Other ideas?

-- 
Steve Burling                                    <ma...@umich.edu>
University of Michigan, ICPSR                    Voice: +1 734 615.3779
330 Packard Street                               FAX:   +1 734 647.8700
Ann Arbor, MI 48104-2910

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


Re: Cocoon config: chasing namespace URIs?

Posted by Igor Naumov <ig...@hotmail.com>.
It might be possible  that your  application  is going to w3.org for 
some DTD (e.g. for XML/XHTML validation).
However I am not sure how to prevent this (or even if it make sense to 
avoid retrieving a DTD).

Igor

Fred Vos wrote:
> Hello Steve,
>
> On Fri, Jun 16, 2006 at 08:38:31PM -0400, Steve Burling wrote:
>   
>> To make a long story short, the machine running the site has apparently 
>> lost the ability to contact www.w3.org.  Of the half a dozen other machines 
>> on our network that I tested, all except the problem machine could contact 
>> www.w3.org, and aren't exhibiting any problems.
>>
>> The only references to that site that I've found are in namespace 
>> definitions like these:
>>
>> <?xml version="1.0"?>
>> <xsl:stylesheet version="1.0"
>> 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> 	xmlns:c-insert="http://apache.org/cocoon/insert"
>> 	xmlns:xhtml="http://www.w3.org/1999/xhtml">
>>
>> I'm not an XML expert; I just run the sites for the folks who are, but my 
>> limited understanding of namespace definitions leads me to believe that it 
>> is the *value* of the attribute, not what it points to, that matters, and 
>> in fact <http://www.w3.org/1999/XSL/Transform> (for example) is just a 
>> simple web page that doesn't look like it'd be useful to an XSLT processor 
>> in any way.
>>
>> So, the question:  *Is* Cocoon attempting to de-reference that URI?  And if 
>> so, is there a knob somewhere I can turn to make it stop?
>>     
>
> No. Namespace URI's are just strings. They do not have to point to an existing
> host or document. In the case of an xsl stylesheet, they must only match the
> namespace URI's for prefixes in the document you are processing. Since these
> URI's are strings, these must match perfect. I've once spent hours and hours
> searching for the cause of a problem, where an extra slash in one of the
> namespace URI's, made the match of URI's fail.
>
> My guess is that you cannot reach w3c because of some network problem, but
> that this network problem is causing errors somewhere else.
>
> Fred
>
>   


Re: Cocoon config: chasing namespace URIs?

Posted by Fred Vos <fr...@fredvos.org>.
Hello Steve,

On Fri, Jun 16, 2006 at 08:38:31PM -0400, Steve Burling wrote:
> To make a long story short, the machine running the site has apparently 
> lost the ability to contact www.w3.org.  Of the half a dozen other machines 
> on our network that I tested, all except the problem machine could contact 
> www.w3.org, and aren't exhibiting any problems.
> 
> The only references to that site that I've found are in namespace 
> definitions like these:
> 
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> 	xmlns:c-insert="http://apache.org/cocoon/insert"
> 	xmlns:xhtml="http://www.w3.org/1999/xhtml">
> 
> I'm not an XML expert; I just run the sites for the folks who are, but my 
> limited understanding of namespace definitions leads me to believe that it 
> is the *value* of the attribute, not what it points to, that matters, and 
> in fact <http://www.w3.org/1999/XSL/Transform> (for example) is just a 
> simple web page that doesn't look like it'd be useful to an XSLT processor 
> in any way.
> 
> So, the question:  *Is* Cocoon attempting to de-reference that URI?  And if 
> so, is there a knob somewhere I can turn to make it stop?

No. Namespace URI's are just strings. They do not have to point to an existing
host or document. In the case of an xsl stylesheet, they must only match the
namespace URI's for prefixes in the document you are processing. Since these
URI's are strings, these must match perfect. I've once spent hours and hours
searching for the cause of a problem, where an extra slash in one of the
namespace URI's, made the match of URI's fail.

My guess is that you cannot reach w3c because of some network problem, but
that this network problem is causing errors somewhere else.

Fred

-- 
|E  R
| D  F
|
|fred at fredvos dot org
|5235 DG 52 NL +31 73 6411833

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


Re: Cocoon entity catalog debugging (was Re: Cocoon config: chasing namespace URIs?)

Posted by Steve Burling <sr...@umich.edu>.
--On June 21, 2006 2:05:24 AM -0500 Antonio Gallardo <ag...@agssa.net> 
wrote:

> Did you copied the entities directory into your cocoon webapp/WEB-INF dir
> [1]?

To which I reply:

It's already there.  And the samples that relate to catalogs *do* show 
being resolved to the local catalog.

I'm mystified.

-- 
Steve Burling                                    <ma...@umich.edu>
University of Michigan, ICPSR                    Voice: +1 734 615.3779
330 Packard Street                               FAX:   +1 734 647.8700
Ann Arbor, MI 48104-2910

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


Re: Cocoon entity catalog debugging (was Re: Cocoon config: chasing namespace URIs?)

Posted by Antonio Gallardo <ag...@agssa.net>.
Steve Burling escribió:
> --On June 18, 2006 10:21:59 PM -0500 Antonio Gallardo 
> <ag...@agssa.net> wrote:
>
>> Here is the best solution for your problem:
>> http://cocoon.apache.org/2.1/userdocs/concepts/catalog.html
>
> To which I reply:
>
> This is great.  The only problem is it doesn't seem to work :-(.
>
> I've upped the verbosity level for Cocoon's entity-resolver to 10, and 
> I can see in the Tomcat log as Cocoon starts up that it's processing 
> the w3c/catalog file, and defining the "-//W3C//DTD XHTML 1.0 
> Transitional//EN" entity, but when I load the Cocoon-processed page 
> with the template document that references that entity, I don't see a 
> corresponding set of
>
> resolvePublic ...
> Resolved public: ...
>
> entries, and if I watch with 'ngrep' (as the Cocoon document above 
> recommends) I can see the fetch going out to w3.org.
>
> I've stared hard at the file that contains the DOCTYPE, looking for 
> subtle case-mismatches, without luck.  If anyone has some hints about 
> how to figure out what's going on, I'd really appreciate it.
Did you copied the entities directory into your cocoon webapp/WEB-INF 
dir [1]?

Best Regards,

Antonio Gallardo.


[1] 
http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/entities/

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


Cocoon entity catalog debugging (was Re: Cocoon config: chasing namespace URIs?)

Posted by Steve Burling <sr...@umich.edu>.
--On June 18, 2006 10:21:59 PM -0500 Antonio Gallardo <ag...@agssa.net> 
wrote:

> Here is the best solution for your problem:
> http://cocoon.apache.org/2.1/userdocs/concepts/catalog.html

To which I reply:

This is great.  The only problem is it doesn't seem to work :-(.

I've upped the verbosity level for Cocoon's entity-resolver to 10, and I 
can see in the Tomcat log as Cocoon starts up that it's processing the 
w3c/catalog file, and defining the "-//W3C//DTD XHTML 1.0 Transitional//EN" 
entity, but when I load the Cocoon-processed page with the template 
document that references that entity, I don't see a corresponding set of

resolvePublic ...
Resolved public: ...

entries, and if I watch with 'ngrep' (as the Cocoon document above 
recommends) I can see the fetch going out to w3.org.

I've stared hard at the file that contains the DOCTYPE, looking for subtle 
case-mismatches, without luck.  If anyone has some hints about how to 
figure out what's going on, I'd really appreciate it.

-- 
Steve Burling                                    <ma...@umich.edu>
University of Michigan, ICPSR                    Voice: +1 734 615.3779
330 Packard Street                               FAX:   +1 734 647.8700
Ann Arbor, MI 48104-2910

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


Re: Cocoon config: chasing namespace URIs?

Posted by Antonio Gallardo <ag...@agssa.net>.
Steve Burling escribió:
> So, the question:  *Is* Cocoon attempting to de-reference that URI?  
> And if so, is there a knob somewhere I can turn to make it stop?
Hi Steve,

Here is the best solution for your problem: 
http://cocoon.apache.org/2.1/userdocs/concepts/catalog.html

Best Regards,

Antonio Gallardo


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