negate match

2005-09-08 Thread David
Is there a way to negate a match in cocoon? For example how do I do something to all urls that do NOT contain the word 'bob'? Also what is the recommended way of doing an 'or' in an xmap file? It doesn't seem possible which causes people to copy and paste code all around -- which is obviously

Re: negate match

2005-09-08 Thread Tony Collen
David wrote: Is there a way to negate a match in cocoon? For example how do I do something to all urls that do NOT contain the word 'bob'? Also what is the recommended way of doing an 'or' in an xmap file? It doesn't seem possible which causes people to copy and paste code all around -- whic

Re: negate match

2005-09-08 Thread David
I have been but it isn't working. Do you konw what the correct negation operator is? I know this works in PHP: ^((?!bob).)*$ and I read that this should work in Java: ((?!bob).)* but it does not work in xmap's regexp matcher. An example would be great. Eg. "!bob" Thanks, David Tony Collen wro

Re: negate match

2005-09-08 Thread Tony Collen
David wrote: I have been but it isn't working. Do you konw what the correct negation operator is? I know this works in PHP: ^((?!bob).)*$ and I read that this should work in Java: ((?!bob).)* but it does not work in xmap's regexp matcher. An example would be great. Eg. "!bob" Hmm, it actuall

Re: negate match

2005-09-08 Thread Tony Collen
Tony Collen wrote: Hmm, it actually might not be all that easy. The RegexpURIMatcher uses the org.apache.regexp package. Details about the syntax are at: http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html and it seems like you can do negation, but only with character classes

Re: negate match

2005-09-08 Thread David
Tony Collen wrote: Tony Collen wrote: Hmm, it actually might not be all that easy. The RegexpURIMatcher uses the org.apache.regexp package. Details about the syntax are at: http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html and it seems like you can do negation, but only wi

Re: negate match

2005-09-08 Thread Lars Huttar
David wrote: Tony Collen wrote: Tony Collen wrote: Hmm, it actually might not be all that easy. The RegexpURIMatcher uses the org.apache.regexp package. Details about the syntax are at: http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html and it seems like you can do negat

Re: negate match

2005-09-09 Thread Upayavira
I tend to achieve this with: ... Don't know if that will work for you. Upayavira David wrote: I have been but it isn't working. Do you konw what the correct negation operator is? I know this works in PHP: ^((?!bob).)*$ and I read that this should work in Java: ((?!bob).)* but it does

Re: negate match

2005-09-09 Thread David
Lars Huttar wrote: David wrote: Tony Collen wrote: Tony Collen wrote: Hmm, it actually might not be all that easy. The RegexpURIMatcher uses the org.apache.regexp package. Details about the syntax are at: http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html and it seems l

Re: negate match

2005-09-09 Thread Joose Vettenranta
Now I wanted to change it so certain pages are never served from the cache because they are dynamic. If I go the route you recommended I would have to write: -- if ( live site request and one of the pages that we do not want to serve from cache) { // No cache. Ge

Re: negate match

2005-09-10 Thread Michael Schlotfeldt
I completely agree with David. Sitemaps are to primitive at this point. The addition of "and" and "or" to matchers would be a big step forward. I think he also has a good point about variables. The current setup does not follow the same theory of many other parts of Cocoon. Example, components

Re: negate match

2005-09-10 Thread David
Joose Vettenranta wrote: Now I wanted to change it so certain pages are never served from the cache because they are dynamic. If I go the route you recommended I would have to write: -- if ( live site request and one of the pages that we do not want to serve from cac

Re: negate match

2005-09-10 Thread Upayavira
Michael Schlotfeldt wrote: I completely agree with David. Sitemaps are to primitive at this point. The addition of "and" and "or" to matchers would be a big step forward. AND: ... OR: .. ... Isn't that enough for and and or? Upayavira David wrote: Lars Huttar wrote:

Re: negate match

2005-09-10 Thread Lars Huttar
Upayavira wrote: Michael Schlotfeldt wrote: I completely agree with David. Sitemaps are to primitive at this point. The addition of "and" and "or" to matchers would be a big step forward. AND: ... OR: .. ... Isn't that enough for and and or? For AND, it works, altho