cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wilkes <cwilkes-coc...@ladro.com>
Subject Using own matcher in sitemap cascades to ones below it?
Date Fri, 26 Mar 2004 19:49:31 GMT
Hi all,

  I wrote my own matcher and placed it in the sitemap like so:

<map:matchers default="wildcard">
  <map:matcher name="wildcard"
    src="org.apache.cocoon.matching.WildcardURIMatcher" />
  <map:matcher name="docit" src="my.DocMatcher" />
</map:matchers>

  Then in my pipelines I use it like this:

<map:pipeline>
  <map:match pattern="getart/*" type="docit">
    <map:parameter name="dir" value="/docs" />
    <map:generate src="{1}" />
    <map:transform src="stylesheets/article2html.xsl" />
    <map:serialize />
  </map:match>
</map:pipeline>

<map:pipeline>
  <map:match pattern="ads/*.gif" type="wildcard">
    <map:read mime-type="images/gif" src="ads/{1}.gif" />
  </map:match>
</map:pipeline>


In the my.DocMatcher I print out the SiteMapURI for each call just to
make sure that it is working.  What I'm seeing is that a request for
"ads/blah.gif" gets processd my my.DocMatcher if its <pipeline> segment
is placed AFTER one that references my matcher 'docit'  The wildcard one
aparently matches it as I can see the .gif displayed.

If I place it BEFORE the 'docit' one then the docit one isn't executed.

Anyone else seeing this?  Its like setting the 'type' cascades to all
pipelines below it.

Chris

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


Mime
View raw message