On 02.02.2014 22:50, Graydon wrote:
descendant::* except heading
is really "all the descendant elements without any child heading
elements of the context node", and that's usually a source of
intractable bugs. I think it should be
descendant::* except self::heading
if I want all the descendant elements without any of the descendant
elements who happen to be heading elements.
If you want that and if you insist on using except instead of the
classic filtering by predicate,
descendant::*[not(self::heading)] ,
you can easily write:
.//(* except heading) ,
which (partially) expands to
./descendant-or-self::node()/(* except heading) .
I think you'll just have to remember that the sequences on both sides of
except will be evaluated from the same context.
This clear but apparently sometimes counterintuitive semantics of except
should not change if the expression has some special characteristics.
For example, as you suggest, when the expression on the left looks down
the descendant axis and the expression on the right, under normal (=
mathematically sound) circumstances, would look on the child axis.
Gerrit
--~------------------------------------------------------------------
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>
--~--