[xquery-talk] OJXQI -- seems fundamentally broken
Paul Pedersen
pcp at cerisent.com
Wed May 21 22:34:12 PDT 2003
From the page:
http://otn.oracle.com/sample_code/tech/xml/xmldb/jxqi.html
XQueryContext ctx = new XQueryContext();
try {
Reader strm = new FileReader("exmpl1.xql");
PreparedXQuery xq = ctx.prepareXQuery(strm);
XQueryResultSet rset = xq.executeQuery();
while (rset.next()) {
XMLNode node = rset.getNode(); // get result nodes
System.out.println(" NODE "+ node.getNodeName());
node.print(System.out);
}
} catch (Exception e) {
// do something..
}
What's wrong in this picture? Simply that XQuery returns
"items" not nodes. An XQuery expression can return an
arbitrary sequence of primitive datatypes, Schema types,
disembodied attributes, text nodes, element nodes, etc.
So I don't quite see how the interface as shown can be
considered an "XQuery" interface. Cerisent constructed
an XQuery interface called XDBC (by analogy with JDBC),
and handling heterogeneous item sequences was the >main<
problem.
Cheers,
Paul Pedersen
Cerisent Corporation
More information about the Talk
mailing list