[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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. David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|