You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Thalavoipuram, Kalyan" <Ka...@xpedior.com> on 2000/07/31 16:51:17 UTC

Help with Cocoon - exception ..

 Pls. can anybody help with the following error and how to fix this ...

 Environ:
 Windows 98
 Apache Web Server
 Tomcat
 Cocoon.

 I wrote a producer class "test.class" and generated the XML document
dynamically.
 The first three lines of the XML generated are as follows .. 

test.java ..

StringBuffer str = new StringBuffer ( "<?xml version=\"1.0\"?>" );
str.append(<?xml-stylesheet
href=\"http://localhost:8080/samples/solist.xsl\" type=\"test/xsl\"?>" );
str.append("<?cocoon-process type=\"xslt\"?>");

I'm able to access the http://localhost:8080/samples/solist.xsl file. 

I added the following in the configuration cocoon.properties file ..

producer.type.test=test

 To produce the XML  template using the test producer -- I requested the URL

 http://localhost:8080/test.xml?producer=test

 I'm getting the following error ...

 Error found handling the request.
	org.apache.cocoon.processor.ProcessorException: Could not associate
stylesheet to document:  no matching stylesheet for: explorer
		at
org.apache.cocoon.processor.xslt.XSLTProcessor.getResource(XSLTProcessor.jav
a, Compiled Code)
		at
org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java:10
7)
		at org.apache.cocoon.Engine.handle(Engine.java, Compiled
Code)
		at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
		at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
		at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
		at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
		at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
		at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
		at java.lang.Thread.run(Thread.java:479)





Re: Help with Cocoon - exception ..

Posted by sudhi <su...@insage.com>.
Hi..
The only thing i can see is ...
in ur test.java 

change this line to 
str.append(<?xml-stylesheet
href=\"http://localhost:8080/samples/solist.xsl\" type=\"test/xsl\"?>"
);

str.append(<?xml-stylesheet
href=\"http://localhost:8080/samples/solist.xsl\" type=\"text/xsl\"?>"
);

in that line the "type" is wrong it should be text/xsl not test/xsl

HTH
Sudhi