Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Getting the prefix of a namespace knowing the URI

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Laurent Bihanic <laurent.bihanic AT atosorigin.com>
  • Cc: XOM-interest <XOM-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Getting the prefix of a namespace knowing the URI
  • Date: Fri, 07 Feb 2003 17:45:25 +0100

Elliotte Rusty Harold wrote:
Wouldn't it be possible to just read the prefix from one of the known elements in that namespace? Would this solve your problem?

Yet, it just requires more code to walk up and down the document to find this node.

Maybe, but it's going to take some more convincing. My current thoughts on this are that at best, this is syntax sugar, and it's a nice bit of sugar. I agree it's good not to unnecessarily use two different prefixes for the same namespace. But using multiple prefixes should not cause any problems if the document is otherwise correct.

Well, I think this method would help XOM to provide an XPath-like view of namespaces, i.e. make all the namespaces in scope accessible from any node.

Laurent





Archive powered by MHonArc 2.6.24.

Top of Page