On 30.05.2007 18:56, Adrien Guillon wrote:
> I'm writing some sitemap logic for handling Oasis Document Format (ODF)
> files. However, I've found what looks like a bug in Cocoon-2.1.10. I get a
> NullPointerException when the ZipFileSerializer is preceded by the XInclude
> transformer. I constructed a very simple sitemap and XML files, and have
> been able to reproduce the problem. I'm using Cocoon 2.1.10 with JDK 1.5.
> The problem was also reproduced on Cocoon 2.1.9 with JDK 1.4.
>
> What's funny is that if I take the resultant XML file after the xinclude
> transformation, and serialize with xml, and then run the zip file serializer
> on that file... everything is fine. It doesn't look like an XML document
> issue...
>
> Please find relevant info below.... let me know if anything else is needed.
>
> AJ
>
> Here's a simple sitemap snippet to show the problem:
>
> <!-- This works OK --->
> <map:match pattern="no-pipeline-simple.zip">
> <map:generate src="no_pipeline.xml"/>
> <map:serialize type="zip"/>
> </map:match>
>
> <!-- This fails -->
> <map:match pattern="simple.zip">
> <map:generate src="simple_xi.xml"/>
> <map:transform type="xinclude"/>
> <map:serialize type="zip"/>
> </map:match>
>
> <!-- something to include -->
> <map:match pattern="simple.xml">
> <map:generate src="simple.xml"/>
> <map:serialize type="xml"/>
> </map:match>
>
>
> Now I have two other files:
>
> simple.xml: <simple>Hello</simple>
>
> simple_xi.xml:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <zip:archive xmlns:zip="http://apache.org/cocoon/zip-archive/1.0"
> xmlns:xi="http://www.w3.org/2001/XInclude" >
> <zip:entry name="content.xml" serializer="xml">
> <xi:include href="cocoon:/simple.xml"/>
> </zip:entry>
> </zip:archive>
Hello Adrien,
can you try 1. to use a reader for simple.xml pipeline instead of
generator + serializer, 2. to include simple.xml directly instead of via
cocoon pipeline?
Joerg
|