W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2003

Inability of location steps to support multiple axes

From: Emerson <emerson@harvestman.net>
Date: Sat, 6 Sep 2003 03:27:41 +0100
To: <public-qt-comments@w3.org>
Message-ID: <000001c3741e$74128ec0$be3e353e@genesis>

I have developed an independent C++ implementation of the XML 1.0 and
Xpath 1.0 standards and during this time I noticed some deficiencies
with the current Xpath specifications.

Primarily there is a lack of ability to combine one or more axes in a
location step.  Though this is not a language limiting feature, it does
make statementes where bi-directional functionality is required very

This deficiency deviates somewhat from the obvious goal of the location
path, which is too progressively filter a selection of nodes.  With each
"/" in the location step representing a new filter, it makes sense to
focus not on "axes" but on a "selection" of nodes.

For example, in the current Xpath expresssions the following is

"parent::a/following-sibling::*//text() |

An obvious solution to the problem which I would like to propose is to
allow Xpath filter expressions to occur as location steps.  This is easy
to implement and does not deviate from the purpose of the filter
expression which is to take a function or an expression which returns a
node-set and filter it by optional predicates, just like a location

It should be noted that the grammar (in Xpath 1.0) atleast for the
filter expression is very poor, and fails to force the intended
behaviour of the filter expression.

So the above example would become:

"parent::a/(following-sibling::* | preceding-sibling::*)//text()"

Which in my opinion is logically much more concise...


Received on Saturday, 6 September 2003 09:12:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:49 UTC