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

Re: Grouping by key

Subject: Re: [xsl] Grouping by key
From: Dimtre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 5 Nov 2004 14:26:08 +1100
atomic value xsl key
On Thu, 04 Nov 2004 23:00:25 +0100, Geert Josten
<geert.josten@xxxxxxxxxxx> wrote:
> > Yes, in XPath 1.0 only the first node in a node-set is used when one
> > value is expected -- there's no distinction b/n functions and
> > operators in this respect.
.
> 
> Oh, but that is not true. See 3.4 of XPath Rec 1.0...

By "one value" I meant an "atomic value" (not a sequence). 

Conversion to boolean being the notable exception:

       boolean(non-empty-node-set) = true()

The above holds always, even when the first node of this node-set has
a value "" or "0".

Still, even in this case it is the presence or absence of the first
node, that solely determines the value.

And there are some functions that accept a single node as an argument
-- when passed a node-set they use its first node.

Such functions are: generate-id(), name(), local-name(),
namespace-uri(), etc. ...

And, of course, there are functions that require a node-set as
argument -- count() comes to mind immediately, but also sum().



Cheers,
Dimitre.

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-2013 All Rights Reserved.