[Xpath-ng] List constructor syntax

Jeni Tennison jeni at jenitennison.com
Tue Dec 3 07:18:57 MST 2002


Hi David,

> Yes, I know. I'm sure it can be made to work, I'm just not sure what
> the advantage is, except for the previously mentioned feature that
> you can get away without having an explicit list constructor.

Well, I think that's a fairly large advantage :) I also think it would
simplify things for users if they didn't have to consider the fact
that some functions might return a singleton list while others return
an actual item, especially if that has an effect on whether you can
pass the value on to another function.

Also, if we adopt the XPath 2.0 convention of using an empty list to
mean an unknown or invalid value, then we really want every function
to return a list (so that all functions work in the same way and some
functions can return this "invalid" value), which means that functions
will have to be able to take lists as arguments.

I don't know -- it just seems cleaner to say that every value is a
list, if we can get away with it...

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/




More information about the Xpath-ng mailing list