S
Soren Kuula
Hi,
I just can't find namespaces of attributes states clearly enough in the
XML namespace spec.
But .. I hear rumors that attributes, unless qualified otherwise,
default to the namespace of the owner element.
Is that right ?
Like:
<?xml version='1.0'?>
<!-- I would think that the "odor" attribute below should belong to the
"smelly->http://www.stench.com"
name space, as its owner element is in that? The irrelevantdor
attribute, of course, is in
the irrelevant->http://sweetaroma.org namespace ... right? -->
<smelly:skunk
xmlns:smelly="http://www.stench.com"
xmlns:irrelevant="http://sweetaroma.org"
xmlns="dongfang.dk"
odor="a"
irrelevantdor="b">
<!-- And I would think that these two elements are semantically
indistinguishable
- - although one is 'lexically' a bit more explicit about the
namespace of its
non-"irrelevant"-NS odor attribute than the other .. right? -->
<smelly:inner odor="1" irrelevantdor="2"/>
<smelly:inner smellydor="1" irrelevantdor="2"/>
<!-- this would be two attributes w same name in same name space and w
same owner element .. an error, right? -->
<smelly:inner smellydor="1" odor="2"/>
</smelly:skunk>
TNX for any reply
Soren (who actually needs to decorate element with attributes in a
different NS, without risk o' clashes)
I just can't find namespaces of attributes states clearly enough in the
XML namespace spec.
But .. I hear rumors that attributes, unless qualified otherwise,
default to the namespace of the owner element.
Is that right ?
Like:
<?xml version='1.0'?>
<!-- I would think that the "odor" attribute below should belong to the
"smelly->http://www.stench.com"
name space, as its owner element is in that? The irrelevantdor
attribute, of course, is in
the irrelevant->http://sweetaroma.org namespace ... right? -->
<smelly:skunk
xmlns:smelly="http://www.stench.com"
xmlns:irrelevant="http://sweetaroma.org"
xmlns="dongfang.dk"
odor="a"
irrelevantdor="b">
<!-- And I would think that these two elements are semantically
indistinguishable
- - although one is 'lexically' a bit more explicit about the
namespace of its
non-"irrelevant"-NS odor attribute than the other .. right? -->
<smelly:inner odor="1" irrelevantdor="2"/>
<smelly:inner smellydor="1" irrelevantdor="2"/>
<!-- this would be two attributes w same name in same name space and w
same owner element .. an error, right? -->
<smelly:inner smellydor="1" odor="2"/>
</smelly:skunk>
TNX for any reply
Soren (who actually needs to decorate element with attributes in a
different NS, without risk o' clashes)