Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] adding NamespaceContext.getNamespaces()

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: Wolfgang Hoschek <wolfgang.hoschek AT mac.com>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] adding NamespaceContext.getNamespaces()
  • Date: Tue, 31 Oct 2006 13:25:56 -0500

Wolfgang Hoschek wrote:

If you'd rather like to expose the namespace map in a strongly typed manner, fine. For example via getNamespaceCount(), getNamespacePrefix(int), getNamespaceURI(int).

That's what I was wondering if you're doing. We could actually cut that down to two methods, at some cost in speed by replacing getNamespaceURI(int) with a getNamespacePrefix(int) followed by a lookup. Usually there's less than a dozen mappings (often only or two) so this might not matter a great deal. Or I could just return a String array of prefixes, and make it one method call.

None of these options are all that difficult. I'm much more concerned with getting the right API, than with saving a half hour of coding.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/




Archive powered by MHonArc 2.6.24.

Top of Page