Re: [xml-dev] Can we treat XML elements and attributes as sets

From
Anne Thomas Manes <>
To
Michael Kay <>
Date
2005-08-21T22:14:00Z
ID
<>
Thread
Re: [xml-dev] Can we treat XML elements and attributes as sets
I don't think it's appropriate to consider an element with an
unqualified name as being in a namespace with no name. As Elliotte
said at one point in this thread:

> Elements with the same name but different URIs are different kinds of elements. 
> Elements with the same name and the same URI are the same kind of element.

If you go with the reasoning that elements with no namespace are
elements in the namespace with no name, then the following two
elements would be the same kind of element, when obviously they are
not:

<a>pi</a>

<a>
  <b>3.14156</b>
</a>

Anne

On 8/21/05, Michael Kay <> wrote:
> > Thanks Mike for clarification, and more information..
> > I did'nt knew namespace URIs could be null.
> 
> The namespace URI property of an element or attribute node can be null,
> meaning that the element or attribute is "not in a namespace". What I'm
> saying is that it's often more convenient to regard such elements/attributes
> as being in a namespace, a namespace with no name, and Elliotte's model
> which you quoted seems to treat them that way.
> 
> Michael Kay
> http://www.saxonica.com/
> 
> 
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
> 
>