Altova Mailing List Archives

Re: Microsoft question?

From: Mark Johnson <102334.12@----------.--->
Date: 8/20/2003 2:55:00 PM
Oleg Tkachenko <oleg@N...> wrote:

>Mark Johnson wrote:

>> For attributes, both prefix and attribute must be individually
>> unique for the same element (which does sort of defeat the notion of
>> namespaces).

>Stop thinking about prefix - it doesn't matter. What matter is namespace URI 
>and local name. 

The prefix is how you assigned an element or attribute to a particular
ns. It's the name, or label, for that ns, even if technically it's the
uri string that is associated with the element or attribute.

>> <el n1:a="" n2:a=""> is invalid,
>It's valid if n1 and n2 prefixes bound to different namespace URIs.

I was borrowing from that example, below. It's sort of a 'trick
question'. And I missed it. They were assigning n1 and n2 to the same
arbitrary 'uri' string. It's why would anyone do _that_, right?

>"5.3 Uniqueness of Attributes",

>> The namespace axis in XPath doesn't report namespace in use by the
>> element, but rather namespaces that could be used by the element. Only
>> by using the function, namespace-uri(), on the node itself can you
>> determine if the element has a particular associated ns.

>Bingo :)

I had misunderstood, before. I thought that the namespace axis
collection was reporting ns assignment and association. And as I think
about it, that doesn't make much sense.


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.