[ Disclaimair: this is OT, because it pertains to a xerces-c usage issue, but unfortunatly there's no xerces-c-users mailing list. I've already sent this mail to the xerces-c-dev mailing list but I got no answer. Sorry. ]
I'm writing a library that aim to implement a subset of the XML Schema recommendation for the OCaml programming language. The library is free software and is currently entirely developed in OCaml on top of the PXP XML parser. I would like to reuse the Xerces C++ (or even C, if any) engine for handling regular expressions as described in the XML Schema Recommendations. My idea is to write a binding for the OCaml programming language, the binding need to expose just two functions: 1) a function taking a UTF-8 encoded string describing a regular expression and costructing a regular expression "object" from it 2) a function taking a regular expression "object" and a UTF-8 encoded string and try to see if the given string match the given regular expression returning a boolean value I know almost nothing of the Xerces API, but looking at the code I've found the RegularExpression class (in util/regx/RegularExpression.hpp) that seems to have an interface doing what I'm trying to do. Anyway the class seems to be undocumented in the API DOC and I'm asking for some help ... So the first question is: does that class do what I need? Is that class implementing the Schema regular expressions? The second one is technical, I've tried naively to do something like: RegularExpression *rex; rex = new RegularExpression("foo"); if (rex->matches("foo")) cout << "Eureka!" << endl; else cout << "Sob :-(" << endl; but I got a segfault just while trying to instantiate the RegularExpression object. What am I doing wrong? Any hints? TIA, Cheers. -- Stefano Zacchiroli -- Master in Computer Science @ Uni. Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} - http://www.bononia.it/zack/ " I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant! " -- G.Romney --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]