hello,

I use cocoon 2-0-3 running inside a tomcat 4.1.12 on Win2k/Sun JDK
1.4.1_01. I try to serve a simple static HTML page (as described on
the DeveloperWorks Tutorial), but if I point my browser to it, I get
an Internal Server Error (Language Exception). If I look at the
generated sitemap_xmap.java file, it is totally broken.

Looking at the logs, cocoon tells me why:

WARN (2002-11-29) 23:04.28:615 [core.xslt-processor]
(/cc-dev/index.html) Thread-14/TraxErrorHandler: Error in
TraxTransformer:
jar:file:/D:/tomcat4.1.12/webapps/cc-dev/WEB-INF/lib/cocoon-2.0.3.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl;
Line 1802; Column 34;
; SystemID:
jar:file:/D:/tomcat4.1.12/webapps/cc-dev/WEB-INF/lib/cocoon-2.0.3.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl;
Line#: 1802; Column#: 34
javax.xml.transform.TransformerException:
[Logicsheet processor] Attribute 'type' missing in
dynamic tag <map:match>
[...]
FATAL_E (2002-11-29) 23:04.28:615 [core.xslt-processor]
(/cc-dev/index.html) Thread-14/TraxErrorHandler: Error in
TraxTransformer: javax.xml.transform.TransformerException: Stylesheet
directed termination

I think the problem is the first WARN statement, where the stylesheet
used to generate the java file for the sitemap states that the
<map:match> tag MUST have an attribute 'type'. However, in the original
sitemap (which works without any problem), there is no such attribute,
also not in the example from the tutorial, nor in other examples I've seen.

Here goes my (very simple) sitemap:

<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
<map:generators default="file">
<map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/>
</map:generators>

<map:transformers default="xslt">
<map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"/>
</map:transformers>

<map:readers default="resource">
<map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/>
</map:readers>

<map:serializers default="html">
<map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
<map:serializer name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer"/>
<map:serializer name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer" mime-type="image/png"/>
<map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf"/>
</map:serializers>

<map:matchers default="wildcard">
<map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
</map:matchers>

<map:pipelines>
<map:pipeline>
<map:match pattern="index.html">
<map:read src="static/index.html" mime-type="text/html"/>
</map:match>
</map:pipeline>
</map:pipelines>

</map:sitemap>

Probably this is a very simple error, but I do not see it. I've
checked the well-formness of the document with XMLSpy and Pollo, that is not the problem here.

any help would be appreciated,

thanks,
chris

p.s. simply adding an empty "type" attribute to the <map:match> tag makes the XSL work so sitemap_xmap gets compiled, but that leads to
some other error (UnnamedSelector: could not find the component for hint
"text/html")


---------------------------------------------------------------------
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]>

Reply via email to