This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
XPath expression to derive list of distinct element names
- From: Sean McMurray <sean at viaverio dot com>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Wed, 09 Jan 2002 12:48:07 -0700
- Subject: [xsl] XPath expression to derive list of distinct element names
- Reply-to: xsl-list at lists dot mulberrytech dot com
I need an XPath expression that will return a list of node names it the
tree frag.
I want the names to be distinct.
The best I can come up with is:
"*[local-name() != local-name(preceding-sibling::*)]"
But the local-name function only gives the name of the first node in the
nodeset.
This is really an XPath question. I'm not doing this in XSL, so I can't
use templates or any other non-XPath construct.
It needs to be a single XPath expression.
Thanks for any help.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list