On 09/17/2010 06:55 PM, Sands Alden Fish wrote:
Hi all, I'm trying to make sure I understand what happens in a certain
pipeline flow using Matchers.

If you've got an embedded matcher, with further pipeline elements after
it, and the inner matcher doesn't match, does the pipeline default to
the elements below it?

Default it's not the word I would use, let's just say that the execution flow will proceed to the next element, regardless if the previous is matched or not... selectors are a different beast, but matchers work like this.


And more to the point, if the matcher matches, do those additional
elements after it get included in pipeline processing?

Yes.


Perhaps the
example will illuminate best:

<map:match pattern="disseminate-package/*/*/**">
<map:match type="request-parameter" pattern="package">
<map:read type="DisseminationPackageReader">
<map:parameter name="handle" value="{../1}/{../2}"/>
<map:parameter name="name" value="{../3}"/>
<map:parameter name="package" value="{1}"/>
</map:read>
</map:match>
<map:read type="DisseminationPackageReader">
<map:parameter name="handle" value="{1}/{2}"/>
<map:parameter name="name" value="{3}"/>
</map:read>
</map:match>

It appears to me that the DisseminationPackageReader will execute twice
in the situation where the "package" parameter is present. Is this true?

That is what I would expect.


Shouldn't this be using a request-parameter Selector or some such
mechanism to decide whether to use the first or the second pipeline?

Yes.

Regards,

Luca Morandini
[http://www.lucamorandini.it]


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Reply via email to