[Home] [By Thread] [By Date] [Recent Entries]

  • From: Michael Kay <mike@s...>
  • To: xml-dev@l...
  • Date: Thu, 03 Feb 2011 09:54:13 +0000


> 2. Copy the following expression (and a variation for attribute names) 
> into the XPath 2.0 editor and then press 'save' to add it to the saved 
> expression list:
>        distinct-values(for $n in //* return local-name($n))
>

The variable here seems ugly: why not

distinct-values(//*/local-name())

Or if you want distinct paths

distinct-values(//*/string-join(ancestor-or-self::*/local-name(),'/'))

Michael Kay


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member