logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: is function 'matches' supported?: msg#00002

Subject: Re: is function 'matches' supported?

 

 

-----Original Message-----
From: Giota Karadimitriou [mailto:Giota.Karadimitriou-E+QESPr5TdxBDgjK7y7TUQ@xxxxxxxxxxxxxxxx]
Sent
:
Thursday, April 07, 2005 5:05 PM
To: 'Giota Karadimitriou'
Subject: RE: [Chiba-developer] is function 'matches' supported?

 

I found there exists a chiba:match function doing the same thing with an extra argument, so I will use that.

 

Thanks

 

Giota

 

-----Original Message-----
From: chiba-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx [mailto:chiba-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx] On Behalf Of Giota Karadimitriou
Sent:
Thursday, April 07, 2005 4:36 PM
To: chiba-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
Subject: [Chiba-developer] is function 'matches' supported?

 

Does Chiba support the xpath function matches(string,pattern)?

 

I get an error when I use xforms:constraint="matches(.,’\d’)”

 

org.apache.commons.jxpath.JXPathException: Undefined function: matches

 

However when the constraint is written like :constraint="string-length(.)=1 and matches(.,’\d’)”

I get no error; is the second part of the xpath _expression_ silently omitted?

 

Could you give a hint how to work around this problem?

There exists a static method in ChibaExtensionFunctions called ‘match’ (see below) which could do this job

 

public static boolean match(String input, String regex, String flags) {

 

but it is not registered in DOMCompiler.getFunctionName

 

 

Regards

Giota

<Prev in Thread] Current Thread [Next in Thread>