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

RE: namespace::* or what?

Subject: RE: namespace::* or what?
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Fri, 16 Feb 2001 18:33:12 -0000
RE:  namespace::* or what?
> How do I find out -- in the most efficient way -- what namespaces
> have been mapped using xmlns? I want to known in the document node
> so that I can apply some text in the beginning of the result document.

You can do select="//namespace::*" but the list will contain many
duplicates. These are not easy to eliminate using the normal techniques
because namespace nodes are not on the preceding axis and cannot be keyed
(because they cannot be matched in a pattern).

With Saxon you can do saxon:distinct(//namespace::*)

If you are only interested in namespaces that are actually used in the name
of an element, you can do Muenchian grouping on the full set of element
nodes (//*) with a grouping key of namespace-uri(); you can add those used
in attribute names by using (//*|//@*).

Mike Kay


 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.