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

Re: // expanding to descendant-or-self::node()

Subject: Re: // expanding to descendant-or-self::node()
From: Evan Lenz <evan@xxxxxxxxxxxx>
Date: Wed, 17 Sep 2008 09:02:28 -0700
Re:  // expanding to descendant-or-self::node()
Wendell Piez wrote:
At 07:44 PM 9/16/2008, Evan wrote:
So, instead, you'd have to write (@* | ./descendant::*/@*). In that case, the actual definition of // is handy.

Or, "descendant-or-self::*/@*", the long way, which works in any case (and is a good thing to know how to write even if you never write it).


The bottom line seems to be that like many features of many technologies, "//" works best for those who can also do without it. And this would probably be true no matter how it was defined.

Good point. And I'm really not trying to defend the final design as the best one. If "//" was short for "/descendant::" as so many people seem to intuit (rather logically for 90%+ of cases), then that would have eliminated the biggest related gotcha: the distinction between //foo[1] and (//foo)[1]. That has got to be the biggest downside of the way "//" is defined.


On the other hand, if we took out all the quirks and gotchas, we'd have fewer excuses to enjoy each other's company on XSL-List. :-)

Evan

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.