cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] Matcher SandBox Thu Apr 29 17:00:03 2004
Date Thu, 29 Apr 2004 15:00:03 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=Matcher , version: 13 on Wed Apr 29 14:10:17
2004 by JakobFix

+ !Regular Expression Matching Syntax
+ 
+ This is quite similar to the Wildcard Matching Syntax (see above), except that instead of
asterisks ('*' and '**'), full-blown regular expression have to be used.  Also, as the default
matcher is {{wildcard}}, you have to explicitly set the {{type}} to {{regexp}}.  To reuse
submatches, you have to surround the regular expressions with parentheses.  You can then refer
to them by using the usual Cocoon conventions, i.e. {{ '{N}' }}.
+ 
+ In the following example, three different URL patterns are matched by just one matcher (using
the Wildcard Matcher, three different {{map:match}} sections would have to be used):
+ {{{
+ <map:match type="regexp" pattern="db/(.*)/(.*)/(toc|lot|lof)/(.*).xml">
+   <map:read mime-type="text/xml" src="db/{1}/{2}/{3}/{4}.xml"/>
+ </map:match>
+ }}}
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=SandBox , version: 360 on Wed Apr 29 14:11:20
2004 by JakobFix

- test
- [TestPage]



Mime
View raw message