This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Re: Re: mapping (Was: Re: Re: . in for)
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 9 Jan 2002 10:38:06 +0000
- Subject: Re: [xsl] Re: Re: mapping (Was: Re: Re: . in for)
- Organization: Jeni Tennison Consulting Ltd
- References: <20020109095527.5036.qmail@web14510.mail.yahoo.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Dimitre,
> I guess a similarity with '/' will lead to confusion only -- the
> ***difference*** is bigger as '/' produces a node-set and not (any)
> sequence.
You could be right. Personally, I find it rather intuitive, precisely
because it's similar to '/', but it might just be me.
> Perhaps one would want to write something like this:
>
> $departments/(lower-case(.))
Well, yes, I did :), until Mike persuaded me it wasn't a good idea
because:
$departments/name/lower-case(.)
would on occasion give surprisingly different results from:
$departments/lower-case(name)
It seemed a natural extension now that function calls, and even more
complex expressions, are allowed as steps within path expressions as
long as they return a node set. The path:
$departments / key('students', student/@id)
/ if (@registered = false())
then name
else ()
works, after all. (Just demonstrating the use of if in a general step
- the same thing could be done more elegantly with a predicate
instead.)
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list