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 16:37:07 UTC

Re: XSP Generator not using Cocoon Entity Resolver but default xerces resolver

	Hi all,

	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.

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)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:103)
	at java.io.FileInputStream.<init>(FileInputStream.java:66)
	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:69)
	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:156)
	at java.net.URL.openStream(URL.java:960)
	at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:731)
	at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:660)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(XMLDocumentFragmentScannerImpl.java:1074)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1490)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
	at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:525)
	at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:581)
	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1157)
	at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
	at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
	at org.apache.cocoon.components.language.markup.LogicsheetCodeGenerator.generateCode(LogicsheetCodeGenerator.java:173)
<remaning removed for clarity>



Re: XSP Generator not using Cocoon Entity Resolver but default xerces resolver

Posted by David Crossley <cr...@apache.org>.
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