|
Subject: Re: [xsl] Re: Re: mapping (Was: Re: Re: . in for) From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Wed, 9 Jan 2002 10:38:06 +0000 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Re: Re: mapping (Was: Re: Re:, Dimitre Novatchev | Thread | [xsl] RE: Re: mapping (Was: Re: Re:, Dimitre Novatchev |
| RE: [xsl] counting question, Michael Kay | Date | RE: [xsl] Re: mapping (Was: Re: Re:, Michael Kay |
| Month |