You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by George Agnelli <ge...@mattandgeorge.com> on 2002/02/18 20:16:02 UTC

Newbie question about patterns in sitemap.xmap

Hi,

I couldn't find an answer to this question in the archives or in the Cocoon
docs so apologies if it's a dumb one.

I'm simply trying to match a filename pattern in the sitemap.xmap for
testing purposes. The file names could be like this Item1.html, Item2.html
and so on, or item1.html, item2.html and so on. In grep I can match these
patterns using [Ii]tem[0-9*].html but when I use this in the sitemap like
this <map:match pattern="xslt/[Ii]tem[0-9*].html"> it can't find the files.
Is it possible to use these kind of expressions or do I need to try
something else?

Thanks

George



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Newbie question about patterns in sitemap.xmap

Posted by Tony Collen <tc...@hist.umn.edu>.
George Agnelli wrote:

>Hi,
>
>I couldn't find an answer to this question in the archives or in the Cocoon
>docs so apologies if it's a dumb one.
>
>I'm simply trying to match a filename pattern in the sitemap.xmap for
>testing purposes. The file names could be like this Item1.html, Item2.html
>and so on, or item1.html, item2.html and so on. In grep I can match these
>patterns using [Ii]tem[0-9*].html but when I use this in the sitemap like
>this <map:match pattern="xslt/[Ii]tem[0-9*].html"> it can't find the files.
>Is it possible to use these kind of expressions or do I need to try
>something else?
>
>Thanks
>
>George
>

Try:

<map:match type="regexp" pattern="xslt/[Ii]tem[0-9*].html">

You need to tell Cocoon that you're using a Regular Expression instead 
of a "normal" pattern.

Hope this helps..

Tony


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>