cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Holmes <mhol...@uvic.ca>
Subject Generating plain text on Cocoon 2.1.6
Date Mon, 02 May 2005 18:19:20 GMT
I'm having problems generating plain text output (utf-8) on Cocoon 
2.1.6. I get a NullPointerException. The scenario is:

       <map:match pattern="proof/*.txt">
         <map:generate src="abstracts_for_proofing/{1}.xml"/>
         <map:transform type="xinclude"/>
         <map:transform type="xslt" src="xsl/text_out.xsl"/>
         <map:serialize type="text" />
       </map:match>

The XML files are UTF-8 and the XSL file starts out like this:


<xsl:output method="text" encoding="utf-8" media-type="text/plain"/>

<xsl:template match="/">
  	<xsl:processing-instruction
name="cocoon-format">type="text/plain"</xsl:processing-instruction>
  	<plain-text>
		<xsl:apply-templates />
	</plain-text>
</xsl:template>

The XSL works fine running locally in oXygen with Saxon 6.5.3. I've 
tried removing the processing instruction, but it makes no difference. 
I've also tried adding a UTF-8 text serializer to the sitemap like this:

<map:serializer logger="sitemap.serializer.text" mime-type="text/plain"
         name="text" src="org.apache.cocoon.serialization.TextSerializer">
         <encoding>UTF-8</encoding>
       </map:serializer>

but no joy.

I've included the top few lines of the stack trace below. Can anyone 
suggest what the problem might be?

org.apache.cocoon.ProcessingException: Error executing pipeline.: 
java.lang.RuntimeException: java.lang.NullPointerException
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:825)
	at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:270)
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:468)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:89)
	at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:240)
	at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:180)
	at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:89)


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


Mime
View raw message