cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Huttar <>
Subject cinclude doesn't cinclude, only garbles its input
Date Fri, 22 Jul 2005 21:24:54 GMT
Dear Cocoonists,

We're getting strange results from cinclude. It's all the more baffling 
because cinclude works fine in many cases.
FYI we've tried this with Tomcat 4.1, Tomcat 5.5, and Jetty, and Cocoon 
2.1.2,, and 2.1.7. All give the same results.

When I run the troubled URL, 
"http://localhost:8888/mount/ethnologue/checks/list-tables", the browser 
gives an XML parsing error because the output from cinclude is not 
well-formed XML: most elements have no close tags!

If I do a view-source on the output of the cinclud transform, it looks 
like this:
<table xmlns:cinclude="">
(That's really the end!)
Note that only the last element is closed.
The pipeline in the sitemap:
      <map:match pattern="checks/list-tables">
        <map:generate src="sources/ethnologue-schema.xml"/>
        <!-- Generate cinclude statements for checks/count-rows from 
<table> elements. -->
        <map:transform src="transforms/list-tables-cinclude.xsl" 
        <!-- Process cinclude statements. -->
        <map:transform type="cinclude" label="raw2"/>
        <map:serialize type="xml"/>

The data in the pipeline before the cinclude transformer 
(check/list-tables?cocoon-view=raw) looks like this:
<tables xmlns:cinclude="">
  <cinclude:include src="cocoon:/checks/count-rows?table=Development_Type"/>
  <cinclude:include src="cocoon:/checks/count-rows?table=Writing_System"/>

In other words, the output of the cinclude transformer is the same as 
its input, except that each <cinclude:include> element becomes a child 
of the previous one. Or to put it another way, all the endElement events 
except one are dropped. There is no processing of the src URLs.
Incidentally, if you run the src URLs on their own, e.g. 
they run successfully and produce well-formed XML output:

<table [namespace declarations for xsp, xspdoc, esql, xsp-request]>
  <name>Development Status</name>

As I mentioned at the top, cinclude works fine for us in other applications.

Any ideas?

One interesting thing is that if we follow the cinclude transformer with 
an XSLT transformer that simply copies its input, that the XSLT 
transformer's output is
<table xmlns:cinclude="">

In other words, all the unclosed elements get closed. But still no 
indication of why they became children of each other, nor why the 
<cinclude:include> elements didn't get replaced with the output of their 
respective src pipelines.

Any help would be appreciated...

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message