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

Re: More namespace fun?

Subject: Re: More namespace fun?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 10 Mar 2000 15:16:35 GMT
Re: More namespace fun?
> So, for instance the para tag has
> a whole host of namespaces 'attached' to it.

Yes namespace nodes clone themselves down the input tree.
An element has in its namesapce axis a namespace node for _every_
namespace declaration that is in scope. You don't need to go looking up
the tree to find out what namespaces you have available at this point.
The information is just there.

> I know this is a contrived example, but
> what earthly use is this information?

It's like wandering in to the british library and saying 
`Why do you need all these books?'. Information is always useful.

> I also note that the namespaces are provided
> in document order, 

Like attributes, namespaces are provided in whatever order the
parser cares to provide them. You should not rely on it.

Actually there _is_ a reason for namespace nodes.
Imagine that the input tree had xpath expressions.
so there is a <xxxx href="aaa/b:ggg[c:y]">
you can grab hold of that attribute with @href but if you want
to make use of it _as an xpath expression_ you need to know 
what namespace is attatched to the prefix b: at this point in
the input document. Note unlike normal matching on attributes
and elements it is the _prefixes_ b: and c: that matter here.


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

Current Thread


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.
First Name
Last Name
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.