OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

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

[ Lists Home | Date Index | Thread Index ]

The terminology of each of the specs is slightly different.

XML doesn't know about namespaces at all (unfortunately).

The XML namespaces spec says "If the URI reference in a default namespace
declaration is empty, then unprefixed elements in the scope of the
declaration are not considered to be in any namespace. " 

The Infoset says, of the [namespace name] property of an element information
item: " If the element does not belong to a namespace, this property has no
value."

The XPath 2.0 data model says that the name of an element or attribute is a
QName as defined by the xs:QName data type in XML Schema. XML Schema Part 2
says that a QName contains a namespace name and a local part; oddly, it does
not mention that the namespace name might be absent or null.

Most of these specs avoid using the dreaded "null" word, probably because of
its traumatic history in relational databases. But XSLT says (in 3.1):

"Throughout this specification, an element or attribute that is in no
namespace, or an expanded-QName whose namespace part is an empty sequence,
is referred to as having a null namespace URI." 

This is to enable the spec to retain terminology that's familar from XSLT
1.0.

Note that a namespace URI cannot itself be null; but a property of an object
that might otherwise hold a namespace URI, and that might be referred to as
"the namespace URI property", can be said to be null when the namespace URI
is absent.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Mukul Gandhi [mailto:mukul_gandhi@yahoo.com] 
> Sent: 21 August 2005 13:29
> To: Michael Kay; xml-dev@lists.xml.org
> Subject: RE: [xml-dev] Can we treat XML elements and 
> attributes as sets
> 
> Hi Mike,
> --- Michael Kay <mike@saxonica.com> wrote:
> > The namespace URI property of an element or
> > attribute node can be null,
> > meaning that the element or attribute is "not in a
> > namespace". 
> 
> Are you explaining this point about XML namespaces
> from XSLT spec's point of view which treats elements
> and attributes as nodes(XML spec does'nt!)? Or is it
> true from XML's point of view also?
> 
> > What I'msaying 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.
> 
> Thanks Mike!
> Regards,
> Mukul
> 
> > Michael Kay
> > http://www.saxonica.com/
> 
> 
> 
> 
> 		
> ____________________________________________________
> Start your day with Yahoo! - make it your home page 
> http://www.yahoo.com/r/hs 
>  
> 






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS