Subject: Re: Find distinct nodes from a sequence
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 07 Jul 2011 11:58:54 -0400
|
Trivia alert -- in XPath 2.0 there are a number of ways to do this:
$x/.
$x|$x
$x|()
$x intersect $x
$x except ()
basically anything that involves any of the set operators but doesn't
otherwise modify the sequence.
I agree that $x/. is hard to beat, especially for those with limited
keyboard skills. (Plus, the way it works is really obscure, which in
some quarters will mean artful.)
Cheers,
Wendell
On 7/7/2011 4:31 AM, David Carlisle wrote:
On 07/07/2011 09:25, Andrew Welch wrote:
That is a great tip....
the best thing about it, on a UK keyboard at least, is that it only
requires typing two characters, on adjacent keys, with the right hand.
So there's a greater than 50% chance of typing it without introducing a
typing error, which can't be said of every xpath (or English) construct.
--
======================================================================
Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
|