xsl-list
[Top] [All Lists]

Re: [xsl] Find distinct nodes from a sequence

2011-07-07 10:58:59
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(_at_)mulberrytech(_dot_)com
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
======================================================================

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--