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

Re: Selecting the first node set

Subject: Re: Selecting the first node set
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 15 Aug 2006 10:36:59 -0400
Re:  Selecting the first node set
At 01:02 PM 8/14/2006, you wrote:
Wendell Piez wrote:

> > (//Value)[1]

> I've started teaching /descendant::Value[1] as a more intuitive and
> transparent solution to this little (but consequential) conundrum.

> It's also reassuring to newcomers who want a simple thing to be
> simple

  What you gain somewhere, you loose it elsewhere.  For example in the
simple "definition" of "//" (something like "it is identical to
descendant::").

Ah, but that definition is inaccurate, which is why the difficulty arises to begin with.


  I think that to know the language, you have to know such subtleties.
But of course, at the biginning, using a less error-prone alternative
is best.  And I think the abbreviate syntax is more intuitive and
readable to the non-used eye.

It is, until it gets you into trouble because you think it's defined one way and it's actually defined another. In other words, what you gain somewhere, you lose elsewhere.


Of course I prefer to show the truth of the matter -- and do, to anyone who has ears to hear. But for learners who get all huffy that something doesn't work the way they think it "should", it's nice to have a simple alternative that doesn't pull their chains.

Cheers,
Wendell

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.