[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Find distinct nodes from a sequence

Subject: Re: Find distinct nodes from a sequence
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 07 Jul 2011 11:58:54 -0400
Re:  Find distinct nodes from a sequence
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 ======================================================================

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.