Subject:External Java class problems Author:Steven Fancher Date:22 Mar 2006 12:40 PM Originally Posted: 22 Mar 2006 12:29 PM
I know this has been beaten to death, but having read the forms - I am still at a loss:
Here's the data, First the java decl and reference from the query...
declare namespace util ="java:QueryHelpers";
let $DNSAddress := util:resolveForwardDNS($hostname)
let $reverse := util:resolveReverseDNS($loopback)
* When I run this in an external saxon parser - it works like a charm.
* When I run it under StylusStudio (using either built-in or saxon) it
fails!
The screen shots of the errors, the project classpath and the java classes in the /bin directory are are attached of they are helpful at all.
Thanks in advance!!
-Steven
Subject:External Java class problems Author:Minollo I. Date:22 Mar 2006 01:02 PM
Right click on your project root and select "Set classpath"; include the folder where your .class files are in the classpath. The query should work at that point.
Subject:External Java class problems Author:Ivan Pedruzzi Date:23 Mar 2006 04:01 PM
Steven,
You are right 7.1 doesn't let you run Saxon XQuery using java extension. This has been fixed in the upcoming 7.2
You can still use the built-in XQuery processor with slightly different syntax. Unfortunalty extension function binding is not part of the standard so each processor has its own way.
Here is an example
declare namespace util ="class:QueryHelpers";
declare function util:resolveForwardDNS($s as xs:string) external;
let $r := util:resolveForwardDNS('pedruzzi.com')
return $r
Subject:External Java class problems Author:Steven Fancher Date:26 Mar 2006 11:23 AM
Yes It helped Greatly!!
Too bad about not being able to do the java call from StylusSytudio directly... I use it to develop and test queries that I run through saxon via a java process.
Subject:RE: External Java class problems Author:David Karr Date:27 Mar 2006 02:27 PM
When I view the "About" dialog, I don't see anything that says version
7.1 or 7.2. It just says "Stylus Studio 2006 XML Enterprise Edition",
build 501i.
What is the difference between Stylus Studio 7.[12] and what I have?
> -----Original Message-----
> From: stylus-studio-xquery Listmanager
> [mailto:stylus-studio-xquery.listmanager@stylusstudio.com]
>
> From: Ivan Pedruzzi
>
> >Thanks - is it stable enough
> >for production use and can I
>
> It passed formal QA.
>
> >cantinue to run the current
> >version with it installed?
>
> 7.2 can run side by side with 7.1
>
> Ivan Pedruzzi
> Stylus Studio Team