[Home] [By Thread] [By Date] [Recent Entries]

  • To: Michael Kay <mike@s...>
  • Subject: Re: Can we treat XML elements and attributes as sets
  • From: Alan Gutierrez <alan-xml-dev@e...>
  • Date: Sun, 21 Aug 2005 09:18:09 -0400
  • Cc: 'Mukul Gandhi' <mukul_gandhi@y...>, xml-dev@l...
  • Mail-followup-to: Michael Kay <mike@s...>,'Mukul Gandhi' <mukul_gandhi@y...>, xml-dev@l...
  • User-agent: Mutt/1.4.1i

* Michael Kay <mike@s...> [2005-08-21 08:10]:
> > 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.

    In SAX, no namespace, or the default namespace, is represented
    by the empty string. Closer to the set way of looking at things.

    In DOM no namepsace is represented by null.

    (Another example of how Namespaces can baffle a new user.)

--
Alan Gutierrez - alan@e...
    - http://engrm.com/blogometer/index.html
    - http://engrm.com/blogometer/rss.2.0.xml

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member