xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
- To: Wolfgang Hoschek <whoschek AT lbl.gov>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] Make convert(Node) public
- Date: Thu, 13 Nov 2003 15:34:34 -0500
At 12:00 PM -0800 11/13/03, Wolfgang Hoschek wrote:
Since the XQuery can be arbitrary, I don't know what I'll get back as a result, but I'd still like to convert it to XOM as far as possible. If some unexpected things can't be converted (as in your DOM level 3 example), that's okay, we can live with that, in that case convert(Node) should raise an exception ("can't convert xyz"). The overall idea is to delegate the converting to XOM as far as possible, and only do something special if that won't work. The best place to decide what can and cannot be converted, and how it should be converted is the convert(Node) method, it seems.
I wouldn't suggest using Saxon's XPath API. It's a mess. Try Jaxxen instead. What does an XQuery return from Saxon?
Seems like Document and DocumentFragment would be problems now, plus whatever they're using to represent namespace APIs and other non-node types. And as I recall Saxon is very tricky because it's one of the few DOMs that really does use the same class for all nodes, distinguished only by getNodeType(). Maybe that's changed in 7.x, I'm not sure.
--
Elliotte Rusty Harold
elharo AT metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
-
[XOM-interest] Make convert(Node) public,
Wolfgang Hoschek, 11/13/2003
-
Re: [XOM-interest] Make convert(Node) public,
Elliotte Rusty Harold, 11/13/2003
-
Re: [XOM-interest] Make convert(Node) public,
Wolfgang Hoschek, 11/13/2003
-
Re: [XOM-interest] Make convert(Node) public,
Elliotte Rusty Harold, 11/13/2003
- Re: [XOM-interest] Make convert(Node) public, Wolfgang Hoschek, 11/14/2003
-
Re: [XOM-interest] Make convert(Node) public,
Elliotte Rusty Harold, 11/13/2003
-
Re: [XOM-interest] Make convert(Node) public,
Wolfgang Hoschek, 11/13/2003
-
Re: [XOM-interest] Make convert(Node) public,
Elliotte Rusty Harold, 11/13/2003
Archive powered by MHonArc 2.6.24.