This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Re: mapping (Was: Re: Re: . in for)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]