On Aug 28, 2008, at 4:36 PM, Erasmo wrote:
Because of this i think it is trying to parse the braces as a
resolvable substitution.
....
Caused by: org.apache.cocoon.sitemap.PatternException: Mismatching
braces in expression "^file/([a-z0-9\-]{1,256)quot;
at
org
.apache
.cocoon
.template
.expression
.AbstractStringTemplateParser
.parseSubstitutions(AbstractStringTemplateParser.java:103)
....
How can i configure the matcher or the sitemap or whatever to not
parse the pattern attribute?
http://cocoon.apache.org/2.0/userdocs/matchers/matchers.html
Use '\' to escape '{' and '}' braces.
Vadim
On Thu, Aug 28, 2008 at 12:36 PM, Erasmo <[EMAIL PROTECTED]>
wrote:
Well i have replaced the matcher with one of my own and the
exception is still being thrown. It looks like is the sitemap parser
which is throwing the exception as soon as i include the "{ }"
characters in the pattern attribute. I have tested this:
1.- Adding " } " alone throws:
org.apache.cocoon.sitemap.PatternException: Mismatching braces in
expression "^file/([a-z0-9\-]{)$
2.- Adding " { " alone everything works, regex do not match of course.
3.- Adding " { } " throws: index out of range exception.
4.- Adding " {2} " throws: index out of range exception.
Any clues?
On Thu, Aug 28, 2008 at 9:44 AM, Erasmo <[EMAIL PROTECTED]>
wrote:
I'm trying to use this regex expression in a matcher but as soon as
i use the quantifier {n} or {n,m} ^/file/id/([0-9]{3})$ Cocoon
throws an exception:
org.apache.cocoon.sitemap.PatternException: String index out of
range: 21 at
org
.apache
.cocoon
.components
.treeprocessor
.variables
.StringTemplateParserVariableResolver
.setExpression(StringTemplateParserVariableResolver.java:70)
Does this matcher not support quantifiers?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]