Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Element. // Used for XPath and serialization Why is Element.getNamespacePrefixesInScope() private?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <wolfgang.hoschek AT mac.com>
  • To: Michael Kay <mike AT saxonica.com>
  • Cc: 'Elliotte Harold' <elharo AT metalab.unc.edu>, 'xom-interest' <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Element. // Used for XPath and serialization Why is Element.getNamespacePrefixesInScope() private?
  • Date: Mon, 23 Jan 2006 08:17:07 -0800


On Jan 23, 2006, at 5:18 AM, Michael Kay wrote:

javax.xml.namespace.NamespaceContext

I don't think I want to introduce an external dependency on
that class
since it wasn't a standard part of the JDK until 1.5, and there's
probably some silly legal reason I can't ship it bundled into XOM.

And if you need another reason, it's a very poorly designed interface,
offering no method to find out all the namespaces that are in scope.

Yes, I only realized how poorly designed that interface really is until I had to implement it and XMLStreamReader as part of the "make a XOM tree appear as a STAX pull parser" effort. the javax.*.QName is rather poor as well. Don't go there unless you have to.

Wolfgang.





Archive powered by MHonArc 2.6.24.

Top of Page