[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML DOM Q: understanding namespace nodes

Subject: XML DOM Q: understanding namespace nodes
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Thu, 16 Dec 1999 14:55:06 -0700
dom namespace node
Can someone clear something up for me? I was trying out Khun Yee Fung's
XPathTool and am noticing it only lists namespace nodes where they are
declared.

My interpretation of http://www.w3.org/TR/xpath#namespace-nodes is that
every element that is a descendant of an element where a namespace is
declared will contain an identical namespace node for that prefix/namespace
combo that is in scope. They are kind of like attributes that are inherited,
and are separate from the namespace URI found in the expanded-name of the
element.

<doc>
   <myElement id="1" xmlns="uri0" xmlns:foo1="uri1" xmlns:foo2="uri2">
      <bar>hello world</bar>
   </myElement>
</doc>

...would have a node structure like:

|__element (expanded-name: 'doc'+nullURI)
    |__text '\n   '
    |__element (expanded-name: 'myElement'+'uri0')
    |   |  |__namespace default='uri0'
    |   |  |__namespace 'foo1'='uri1'
    |   |  |__namespace 'foo2'='uri2'
    |   |  |__attribute 'id'='1'
    |   |__text '\n     '
    |   |__element (expanded-name: 'bar'+'uri0')
    |   |   |  |__namespace default='uri0'
    |   |   |  |__namespace 'foo1'='uri1'
    |   |   |  |__namespace 'foo2'='uri2'
    |   |   |__text 'hello world'
    |   |__text '\n  '
    |__text '\n'

Is this correct?

   - Mike
___________________________________________________________
Mike J. Brown, software engineer, Webb Interactive Services
XML/XSL stuff: http://www.skew.org/    http://www.webb.net/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.