|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Grouping by 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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








