Toby -- Can't help with the sql:new() at the moment. But, what does your stack trace look like from the "Instance method call to method new requires an Object instance as first argument" message?
Gary > -----Original Message----- > From: Tobias McNulty [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 26, 2002 9:46 AM > To: [EMAIL PROTECTED] > Subject: Re: SQL Extension > > > >Is anyone out there using the SQL Extension for Xalan? I am having > >trouble setting up the XSL to bind to Java objects, and the example > >doesn't seem to function (I converted it to use the MySQL driver). > >Does anyone have a working example that I could try? > > > >In my experience, the example XSL usually generates obscure > >NullPointerExceptions or TransformerExceptions during the > >transformation. > > > >Thanks, > >Toby > > It appears that sql:new(...) is returning null (which I assume is > because it can't find the driver). The driver has already been > (successfully) loaded in pure Java code using the raw JDBC functions. > Any idea what's going on here? > > > I am also having some trouble calling instance level methods from > XSL. I create a new variable like so: > > <xsl:variable name="avar" select="bt:new()"/> > <xsl:value-of select="bt:myFunc($avar)"/> > > Where myfunc is an instance-level function of the class referenced by > the bt: namespace: > > <xsl:stylesheet ... xmlns:bt="java:com.foo.BindTest" > extension-element-prefixes="bt"> > > Xalan gives me the following error: > > "Instance method call to method new requires an Object instance as > first argument" > > This would lead me to believe that it's trying to call new() as an > instance level method, when it is (I _believe_) a static method (or > "pseudo" method, in this case). Do I have to define anything on the > Java side to support the method new()? > > Thanks, > Toby > > -- > Tobias McNulty > Data Description, Inc. > 840 Hanshaw Road, Suite 9 > Ithaca, NY 14850 > Phone: (607) 257-1000 > E-mail: [EMAIL PROTECTED] > Web: www.datadesk.com >
