This is not a bad article at all, but I thought I would comment on one
point.
"Pipeline lock-in", as the author says, is just a way of saying that
Cocoon pipelines do not support conditionals, i.e. they do not allow
you to take a different branch of execution based on the results of a
previous step in the pipeline. If this is "by design", as I have read
and heard a few times by now, it is a design that is hard to
defend. The author's argument that Cocoon is SAX-based does not hold
water either: consider that some components in a Cocoon pipeline do
not support pure streaming, starting with XSLT. Xalan can be put in a
mode where it starts outputing SAX events before reading its input is
completed, but typically will not happen: in many cases, an XSLT
transformation needs to have read the entire input document before
being able to generate most of its output. The bottom line is that
using conditionals in a SAX pipeline may impact streaming in different
ways, yes, but so does using XSLT!
This is how you would implement a condition in XPL, the OXF
(http://www.orbeon.com/oxf/) pipeline language:
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline">
<!-- First transformation -->
<p:processor uri="oxf/processor/xslt">
<p:input name="data" href="foo.xml"/>
<p:input name="config" href="foo.xsl"/>
<p:output name="data" id="result"/>
</p:processor>
<p:choose href="#result">
<p:when test="/error"><!-- This is an XPath expression -->
<!-- Execute part of pipeline when there was an error -->
...
</p:when>
<p:otherwise>
<!-- Execute part of pipeline when there was no error -->
...
</p:otherwise>
</p:choose>
</p:config>
The problems the author encountered with the limitations of Cocoon
pipelines are I think one of the major reasons so many people have
been (and will be for a long time) frustrated with Cocoon.
-Erik
|