Subject: RE: [xsl] XPath expression to derive list of distinct element names From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Thu, 10 Jan 2002 10:38:20 -0000 |
I don't think it can be done in XPath 1.0. The "implicit existential equals" in XPath works only on node-sets, so it's only useful for eliminating nodes that have duplicate string-values, not duplicate values of some other function such as name(). Mike Kay > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of > Sean McMurray > Sent: 09 January 2002 19:48 > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] XPath expression to derive list of distinct > element names > > > 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 > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XPath expression to derive li, Sean McMurray | Thread | Re: [xsl] XPath expression to deriv, David Carlisle |
Re: Regular expression functions (W, Jeni Tennison | Date | RE: Regular expression functions (W, Steven Noels |
Month |