xsl-list
[Top] [All Lists]

Re: [xsl] namespace defaults

2014-10-28 05:20:47
Marc Lambrichs marc(_dot_)lambrichs(_at_)melange-it(_dot_)nl wrote:
We're a bit confused about namespacing. Suppose we have this:

<ns1:a
xmlns:ns1="http://something.org/ns/1"xmlns:ns2="http://something.org/ns/2";>
   <ns2:b>
     <c>something</c>
   </ns2:b>
</ns1:a>

To what namespace does "c" belong to? I would say: a default one, if
there is any. But what if there isn't one? In the latter case, here's
our guess: there's no prefix, so it doesn't belong to any namespace. Right?

It is in no namespace, right. However, it wouldn't need a prefix to be in a namespace, a default namespace declaration on an ancestor like

<ns1:a xmlns:ns1="http://something.org/ns/1"xmlns:ns2="http://something.org/ns/2"; xmlns="http://example.org/";>
  <ns2:b>
    <c>something</c>
  </ns2:b>
</ns1:a>

would suffice to put it into that namespace http://example.org/
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] namespace defaults, Marc Lambrichs marc(_dot_)lambrichs(_at_)melange-it(_dot_)nl
    • Re: [xsl] namespace defaults, Martin Honnen martin(_dot_)honnen(_at_)gmx(_dot_)de <=