Altova Mailing List Archives
>microsoft.public.xml Archive Home
>Thread Prev - Re: Microsoft question?
Re: Microsoft question?
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", http://www.w3.org/TR/REC-xml-names/#uniqAttrs: >> 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.