Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Namespace Mappings

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] Namespace Mappings
  • Date: Tue, 11 Jan 2005 08:04:18 -0500

XPath is now mostly implemented in CVS, minus the namespace axis; and minus any real thought as to what to do with expressions that don't return nodes. More on those issues later.

However, the issue I'm worrying about now is namespace prefix bindings for XPath expressions. The current version just uses a Map. However, I've decided I don't like that for two reasons:

1. It's not type-safe.

2. I've avoided any interface-level dependencies on the collections API until now, and I'd like to keep it that way. Doing so makes it at least theoretically possible to back port the API to Java 1.1.

OK, so I've decided I don't like the map. What do I like? There are two possibilities:

1. A custom namespace map class.
2. An element.

The custom namespace map class seems a little more obvious. However an element (which in general would not need to be, but could be, the node being queried) removes the need for an extra public class.

Anyone want to express a preference here? Or suggest a fourth option?

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim





Archive powered by MHonArc 2.6.24.

Top of Page