You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marcial Rosales <ma...@spectel.com> on 2004/06/24 17:29:42 UTC

RE: XSP Generator not using Cocoon Entity Resolver but defaultxerces resolver

	Hi David,
	
	I had forgotten to say that in the default catalog file (called catalog) I added this entry:
SYSTEM "book_meeting" "file:///c:/webportal/tomcat/webapps/webportal3/resources/entities/webportal/book_meeting.xml"

	Before that, I had specified my own catalog in CatalogManager.properties, property catalogs; but it did work.

	Tell me if I am right or not on this: if you specify your external entity in the default catalog it should work. Once I get it working I can organize my entities in a different catalog.

	Thank you, David

	I read the chapter dedicated to "Entity resolver" and it exposed several ways of doing, one is the local catalog that I haven't tried yet. I will do it this time.

	 

-----Original Message-----
From: David Crossley [mailto:crossley@apache.org]
Sent: 24 June 2004 16:18
To: users@cocoon.apache.org
Subject: Re: XSP Generator not using Cocoon Entity Resolver but
defaultxerces resolver


Marcial Rosales wrote:
>         I am trying to use the Cocoon catalog for resolving external
> parsed entities. I have configured Cocoon to use its own entity
> resolver but it seems that it is not configuring the parser used to
> parse the XSP files. I am trying to factor out chuncks of xml into
> external xml files that are included into the XSP using entity
> references.

But you have not configured the entity resolver at all,
just raised the verbosity level.

You need to follow the Cocoon Sample called "catalog-demo".
Run './cocoon.sh servlet' and see the Samples.

Specifically you need to add your own catalog.xcat
and configure it in cocoon.xconf using the "local-catalog"
parameter. Your catalog.xcat would define the mapping
between the filename "book_meeting" and some other local file.

--David

> This is the header of my little xsp file:
> 
> <?xml version="1.0"?>
> 
> <!DOCTYPE xsp:page [
>     <!ENTITY book_meeting SYSTEM "book_meeting">
> ]>
>         
> This is the configuration I am using in cocoon.xconf:
> 
> cocoon.xconf :
>   <entity-resolver
> class="org.apache.cocoon.components.resolver.ResolverImpl"
> logger="core.resolver">
>    <parameter name="catalog" value="/resources/entities/catalog"/>
>    <parameter name="verbosity" value="10"/>
>   </entity-resolver>
> 
> This is the configuration in CatalogManager.properties:
> verbosity=10
> catalogs=
> prefer=public
> allow-oasis-xml-catalog-pi=yes
> 
> in this is the log obtained within sitemap.log:
> 
> java.io.FileNotFoundException:
> C:\WebPortal\Tomcat\webapps\webportal3\sitemaps\provisioning\docs\book_meeting (The system cannot find the file specified)




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


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


RE: XSP Generator not using Cocoon Entity Resolver but defaultxerces resolver

Posted by David Crossley <cr...@apache.org>.
Marcial Rosales wrote:
> 	Hi David,
> 	
> 	I had forgotten to say that in the default catalog file (called catalog)
> I added this entry:
> SYSTEM "book_meeting" "file:///c:/webportal/tomcat/webapps/webportal3/resources/entities/webportal/book_meeting.xml"

Ah, the missing piece of information. Your omission is what
lead me to say that you had not done any configuration.

> 	Before that, I had specified my own catalog in CatalogManager.properties,
> property catalogs; but it did work.

It should work.

> 	Tell me if I am right or not on this: if you specify your external
> entity in the default catalog it should work. Once I get it working I can
> organize my entities in a different catalog.

Yes, that approach for testing would be fine.

Raise the verbosity level to 10. When Cocoon starts you
should see the catalog being loaded and your test entry
should be listed.

When the document is being processed, you should then see
various attempts to find the entity and they should result
in a "Resolved" message and it will list the final
system identifier.

> 	I read the chapter dedicated to "Entity resolver" and it
> exposed several ways of doing, one is the local catalog that I haven't
> tried yet. I will do it this time.

Either way should work.

Beware, the verbosity level in CatalogManager.properties
does get over-ridden by cocoon.xconf but other than that
everything should be fine.

Would you be able to add a Bugzilla entry, explain what
you are trying to do, attach your configuration files
and a simple sitemap, and source document, and your logfile
core.log

--David

> -----Original Message-----
> From: David Crossley
> Sent: 24 June 2004 16:18
> To: users@cocoon.apache.org
> Subject: Re: XSP Generator not using Cocoon Entity Resolver but
> defaultxerces resolver
> 
> 
> Marcial Rosales wrote:
> >         I am trying to use the Cocoon catalog for resolving external
> > parsed entities. I have configured Cocoon to use its own entity
> > resolver but it seems that it is not configuring the parser used to
> > parse the XSP files. I am trying to factor out chuncks of xml into
> > external xml files that are included into the XSP using entity
> > references.
> 
> But you have not configured the entity resolver at all,
> just raised the verbosity level.
> 
> You need to follow the Cocoon Sample called "catalog-demo".
> Run './cocoon.sh servlet' and see the Samples.
> 
> Specifically you need to add your own catalog.xcat
> and configure it in cocoon.xconf using the "local-catalog"
> parameter. Your catalog.xcat would define the mapping
> between the filename "book_meeting" and some other local file.
> 
> --David
> 
> > This is the header of my little xsp file:
> > 
> > <?xml version="1.0"?>
> > 
> > <!DOCTYPE xsp:page [
> >     <!ENTITY book_meeting SYSTEM "book_meeting">
> > ]>
> >         
> > This is the configuration I am using in cocoon.xconf:
> > 
> > cocoon.xconf :
> >   <entity-resolver
> > class="org.apache.cocoon.components.resolver.ResolverImpl"
> > logger="core.resolver">
> >    <parameter name="catalog" value="/resources/entities/catalog"/>
> >    <parameter name="verbosity" value="10"/>
> >   </entity-resolver>
> > 
> > This is the configuration in CatalogManager.properties:
> > verbosity=10
> > catalogs=
> > prefer=public
> > allow-oasis-xml-catalog-pi=yes
> > 
> > in this is the log obtained within sitemap.log:
> > 
> > java.io.FileNotFoundException:
> > C:\WebPortal\Tomcat\webapps\webportal3\sitemaps\provisioning\docs\book_meeting (The system cannot find the file specified)



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