Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XPathContext and lookups

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: Michael Kay <mike AT saxonica.com>
  • Cc: 'xom-interest' <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] XPathContext and lookups
  • Date: Fri, 14 Apr 2006 10:34:01 -0400

Michael Kay wrote:
Elliotte, every time someone asks for facilities to do namespace prefix
lookups you ask them why they need it. What can't you just accept that they
do? From here, it's like watching a steady stream of customer going to a
corner shop asking for matches and being told that they don't stock them
because there's no demand...


This is a different request than what I've had in the past. There may be a use case here. If there is one, it's not obvious to me and I don't think I can properly address it without understanding the need.

However if I do make the lookup method in XPathContext public I don't think this would address any of the outstanding requests.
I suspect what you're thinking of is not namespace prefix lookup, which XOM fully supports (just not from XPathContext, at least not yet). It's the enumeration of namespaces in scope on an element.

There are two general reasons I am resistant to adding methods without clear and articulated use cases:

1. It explodes the API, making it harder to document, learn, maintain, and understand.

2. Often than not there's a better way to do what the requester wants. Simply adding requested methods without understanding why the user wants them, risks adding pointless methods and providing a less than optimal solution.

--
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