xsl-list
[Top] [All Lists]

Re: Looking for a shorter mapping expression

2004-12-06 02:21:44
Thanks, Mike.

Now this is clear.

Cheers,
Dimitre.


On Mon, 6 Dec 2004 09:14:04 -0000, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:
It seemed to me that both constraints would be in force for any LHS
operand, because it happens that at the same time this LHS operand is
also the RHS operand of the preceding from left  "/".

I think it's a mistake to think of a path expression as a sequence of steps
separated by "/". (It's therefore also a mistake for the XPath spec to speak
of "the last step in a path expression".) It's better to think of "/" as a
binary higher-order operator. So A/B/C/D is simply ((A/B)/C)/D. The
left-hand operand of "/" is not necessarily sorted and deduplicated; it will
only be sorted and deduplicated if it is itself one of the kinds of
expression that returns its results sorted and deduplicated.


Because every E1 is also some E2 for another "/", then the above
applies fully for this E1, too -- in fact it has been first evaluated
as an E2 and only then it serves as an E1 for the next "/".

It's not true that every E1 is the right-hand operand of a "/" operator. For
example, E1 might be the expression (author, title). Or it might be the
expression reverse(ancestor::*).



Michael Kay
http://www.saxonica.com/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--