You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Woods, Christopher" <cw...@EO.Kollmorgen.com> on 2005/04/25 17:04:24 UTC

XNodeSet Constructor Error: Example Needed

25 April 2005

Hi All,

I'm trying to use a sample program from O'Reilly's XSLT by Doug Tidwell.  The program is an extension that connects to a db and writes the result of a query into a table.  I cannot compile the .java file.  The trouble appears to be this line:

         dbResult = new XNodeSet(table);

The entire program can be viewed here: http://d0om.fnal.gov/d0admin/doctaur/dtdocs/p-langs/xml_bookshelf/xslt/ch08_03.htm.  'table' is an element that contains the results of the query along with markup.  The query and connection info are contained in the stylesheet.  This example is verbatim from the text of the book so I'm a bit confused.  Can anyone point out where this example has gone wrong? Thanks very much.

Christopher Woods


Re: XNodeSet Constructor Error: Example Needed

Posted by Henry Zongaro <zo...@ca.ibm.com>.
Hi, Christopher.

"Woods, Christopher" <cw...@EO.Kollmorgen.com> wrote on 2005-04-25 
11:04:24 AM:
> I'm trying to use a sample program from O'Reilly's XSLT by Doug 
> Tidwell.  The program is an extension that connects to a db and 
> writes the result of a query into a table.  I cannot compile the .
> java file.  The trouble appears to be this line:
> 
>          dbResult = new XNodeSet(table);
> 
> The entire program can be viewed here: 
http://d0om.fnal.gov/d0admin/doctaur/dtdocs/p-langs/xml_bookshelf/xslt/ch08_03.htm. 
 
> 'table' is an element that contains the results of the query along 
> with markup.

     The XNodeSet(Node) constructor was removed in Xalan-J 2.2.0 with the 
introduction of DTM as the internal representation of the XPath data 
model.  You can look at [1] for some information on implementing extension 
elements with the Xalan-J Interpretive processor.

     I don't have access to the link you've provided, so I can't suggest a 
simple rewrite of that sample program.  Be warned though that the APIs one 
uses to write extension elements are all internal APIs of Xalan-Java and 
subject to change, as Doug Tidwell's example demonstrates.

Thanks,

Henry
[1] http://xml.apache.org/xalan-j/extensions.html#ext-elements
------------------------------------------------------------------
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   T/L 969-6044;  Phone +1 905 413-6044
mailto:zongaro@ca.ibm.com