Guys, On 18/5 Joerg asked a question about invalid content length errors[1] due to readers. There is also a bug that is somewhat related[2], but it seems to be WONTFIX.
I have the following case : generator reader | | validator .. dtd | serializer In this case the reader sets the content-length, and the serializer doesn't. So if the length of the serializer's output is greater than that of the dtd, output is incomplete. Althoug a quick fix is not to get the dtd through a reader, I'm sure there are cases where that isn't a solution. I didn't post this as a bug, yet, because I am not sure whether this is just unintended use of the reader. Also, I can't quite get my mind around what's the best way to solve this. Joerg suggested in his original mail[1] to build some awareness in to the reader to see if it is called as a cocoon-source or not. Another possible solution would be setting content-length from all serializers, although Carsten suggests in the closing of the bug that content-length can not be set repeatedly. OTOH I tried to reproduce this behaviour by getting an XSL through a reader, like so: <map:match pattern="read.xsl"> <map:read src="tiny.xsl"/> </map:match> <map:match pattern="readtest.xml"> <map:generate src="sitemap.xmap"/> <map:transform type="xslt" src="cocoon:/read.xsl"/> <map:serialize type="xml"/> </map:match> But apparently the xsl-transformer doesn't like that. Any thoughts? Rogier [1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=108491735914313&w=2 [2] http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17370