Hi Jasha, Matching is not the issue for him I think. You're right that he can easily match on both .BMP and .bmp but there are some open ends to this:
- Is the actual file extension using (always?) lower or uppercase? - Is there any direct support in the sitemap to translate the extension to the correct format? For a windows environment your solution for matching on both upper and lower case will most probably work, but for any unix derivative he will run into a filenotfoundexception. Robby From: Jasha Joachimsthal [mailto:[email protected]] Sent: Monday, January 30, 2012 4:21 PM To: [email protected] Subject: Re: how to make sitemap entries case insensitive Hi Paul, URI's are case sensitive, so that's why the match is too. Another reason is that some file systems are also case sensitive so passing a wildcard would lead to different results. You can use regexp matchers to match both .bmp and .BMP in the same pipeline. First configure the matcher: <map:matcher name="regexp" src="org.apache.cocoon.matching.RegexpURIMatcher" logger="sitemap.matching.regexp"/> Then the pipeline <map:match pattern="^(.+)[.](bmp|BMP)$" type="regexp"> Jasha Joachimsthal Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466 US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free) www.onehippo.com<http://www.onehippo.com/> On 30 January 2012 16:09, Paul Joseph <[email protected]<mailto:[email protected]>> wrote: Hi there, The cocoon site map is case sensitive ( http://cocoon.apache.org/2.1/userdocs/parameter-selector.html). I have the need to upload various images...I have a sitemap (parts shown below). <map:match pattern="*.bmp"> <map:read mime-type="image/bmp" src="context://webtask/taskfiles/{0}"/> </map:match> However the customer tried to upload a file whose extension was in CAPS. as in myimage.BMP Any way to "compactly" address this instead of duplicating all the entries with their cap eqivalents? Paul --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected]<mailto:[email protected]> For additional commands, e-mail: [email protected]<mailto:[email protected]>
