On Tue, Oct 01, 2002 at 07:38:24AM +0900, MikkelFJ wrote:
> "Matt Gushee" <mgushee / havenrock.com> wrote in message
> news:20020930193709.GA1749 / swordfish...
> > > >> <element1 xmlns:N='namespace1'>
> > > >>     <element2 xmlns:N='namespace1'/>
> > > >> </element1>
> > > >>
> > > >> is legal (though a questionable practice, and ignoring opinions
> w.r.t.
> > > >> Namespaces being URLs). In this example there are two namespaces but
> only
> > > >> one prefix is used. In general, the prefix mapping to namespace is
> scoped.
> > > >> This makes it impossible to answer the question you want to ask
> unless you
> > > >> can identify a spot in the document.
> > > >
> > > > I would say 'unreliable' rather than 'impossible'. You're quite right
> 
> What about scoped access:
> ns_of_fullname("N") yields prefix for outermost scope
> ns_of_fullname("N.N") yields namespace string of nested scope.
> ns_of_name("N") yields best matching, preferring least nested scope in case
> of a conflict.

Maybe I'm dense, but I don't follow this at all. Are you saying these
methods exist somewhere? I haven't seen them in the docs for Ruby or
REXML, or in the XML Namespaces spec*. Or are you just asking what-if?
Are you sure you're talking about XML Namespaces as defined by the W3C?
If so, you're using terminology that I've never heard in that context.

* And contrary to what I said earlier, I probably have read the whole thing
  --I just looked at it and was reminded that it's quite short. I've
  become used to W3C specs being enormous and convoluted.

-- 
Matt Gushee
Englewood, Colorado, USA
mgushee / havenrock.com
http://www.havenrock.com/