-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Christian,

Duh! I had completely forgotten that.  Thanks!

Chris

On Wed, May 21, 2014 at 10:12:35AM +0200, Christian Grün wrote:
> Hi Chris,
> 
> sorry for letting you wait.
> 
> >     String query_str = "declare variable $regex as xs:string external; 
> > <results>for $x in //entry where $x//*[fn:matches(.,$regex)] order by 
> > fn:replace($x, '^(\\d+|\\?|\\s+|\\*|-)+','') return $x</results>";
> 
> Your example should work if you use add braces before and after your
> embedded XQuery expression:
> 
>   <results>'wrong'</results>
>   <results>{ 'correct!' }</results>
> 
> Hope this helps,
> Christian
> 
> 
> >     ClientSession session = new ClientSession("localhost", 1984, "edil", 
> > "********");
> >     session.execute(new Open("edil"));
> >     ClientQuery query = session.query(this.query_str);
> >
> >     query.bind("regex", search);
> >     String results = query.execute();
> >
> >     query.close();
> >     session.close();
> >
> > The "results" string is the query_str with no binding (just the
> > variable).  Have I done someting wrong here?
> >
> > Thank you for your help
> >
> > Chris
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1
> >
> > iF4EAREIAAYFAlN7SmgACgkQDjE+CSbP7HrlvwD/RwRh9oSde0wa2uKqyhERORwy
> > caeD7bcZoy6GlFz0ePsA/RG08Exv/Nmq3Hcbls1YrxjADLO3B4CBYrbx2YmLIKZ4
> > =oPyO
> > -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iF4EAREIAAYFAlN8YeAACgkQDjE+CSbP7HpKDgD9E//Gb0+7aMIAjEUnBtDYVK0D
T8RtC0EdffPqeLN7de0BALY6aHYAOeHTVxGY7CpMIeQLpPcd2xL8x870lbqososY
=6vtL
-----END PGP SIGNATURE-----

Reply via email to