Nicola Ken Barozzi wrote:
If the @passthrough attribute is to be put in the <pipelines> section of the mounted sitemap, it seems easy: make the PipelinesNodeBuilder set a passthrough variable in the PipelinesNode, and have the PipelinesNode tell or not the last PipelineNode if it has to stop:
public void setChildren(ProcessingNode[] nodes) { // Mark the last pipeline so that it can throw a // ResourceNotFoundException //-> put an if() here ((PipelineNode)nodes[nodes.length - 1]).setLast(true); // super.setChildren(nodes); }
The point is that it makes sense for the mount node to set it, but I'm not sure which is the preferred way in the TreeProcessor to pass that info from the MountNodeBuilder to the PipelinesNode.
The passthrough information cannot be set on the processing node, as it depends on the runtime environment (a single sitemap can be mounted from different locations with different values for passthrough).
IMO, the easiest way is for the mount node to set an attribute in the Environment (which is private to the pipeline machinery) that gets checked by the Pipelines node of the mounted sitemap. That attribute should of course be reset to its previous value upon return in the mount node.
WDYT?
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }