XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
David IsaacSubject: External Java functions with built-in XQuery processor = implementation not found
Author: David Isaac
Date: 26 Sep 2008 01:56 PM
Hello-
Can anyone tell me how to access something like java.math.BigInteger.gcd() using the built-in XQuery processor? It works fine when I use the DataDirect processor, but when I use the built-in processor for debugging I get an "implementation not found" error.

Postnext
Alberto MassariSubject: External Java functions with built-in XQuery processor = implementation not found
Author: Alberto Massari
Date: 01 Oct 2008 03:18 PM
Hi David,
the built-in XQuery processor only supports instance methods only when the class has a default constructor (i.e. with no arguments), that unfortunately BigInteger doesn't provide. You can workaround the limitation by creating a custom Java class with a static method with two arguments that internally builds the BigInteger using the first argument and then calls the gcd() method using the second one.

Hope this helps,
Alberto

Postnext
David IsaacSubject: External Java functions with built-in XQuery processor = implementation not found
Author: David Isaac
Date: 01 Oct 2008 05:43 PM
Well, that explains it, but I must say it is very inconvenient to wrap every Java class without default constructors that we want to use.

Any plans for Stylus to make the built-in processor work like SAXON or the DataDirect engine in this regard? Right now, we can either debug or use the core Java classes, but not both at once.

Postnext
Alberto MassariSubject: External Java functions with built-in XQuery processor = implementation not found
Author: Alberto Massari
Date: 02 Oct 2008 11:01 AM
Hi David,
you should be able to debug the SAXON processor; is there something not working in that area?

Alberto

Posttop
David IsaacSubject: External Java functions with built-in XQuery processor = implementation not found
Author: David Isaac
Date: 02 Oct 2008 04:58 PM
Thanks, Alberto! I thought I had read that the debugger worked only with the built-in processor.

FYI, I think all the <symbol unknown> values in the watch window left over from prior debugging reinforced my belief that the debugger was not working with SAXON. It would be nice if there was a clean way to delete variables from the watch window. Select, backspace, enter, and restart Studio seems to be the only way to clear a watch variable, and even then it doesn't always delete the selected variable and sometimes gives a "pure virtual function call" error and hangs Studio.

For now, I am happily debugging with SAXON!

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.