W3C home > Mailing lists > Public > www-xpath-comments@w3.org > July to September 1999

Definition of step

From: Weichel Bernhard (K3/EMW4) * <Bernhard.Weichel@de.bosch.com>
Date: Tue, 13 Jul 1999 17:46:53 +0200
Message-ID: <9FB009071AEFD111B5F80000F8FE7F83018243A3@simail7.si.bosch.de>
To: "'www-xpath-comments@w3.org'" <www-xpath-comments@w3.org>
I think it would be better to define the step as it is done in MetaMorphosis

   basis predicate rank

where basis is simply the axis (such as child, parent, descendant, left,
right, preceeding etc.) with no NodeTest.

The NodeTest should be part of the predicate using a special operator such
as (taken from MetaMorphosis language)


The ? operator can be applied to multiple properties such as types,
attributes contents. If no property is specified, then the element name is

   child[data?introduction]   all children containing the text
   child[@id?foo]             all children with Attribute id equals foo
   child[gid?para]            all children with Generic Identifier "para"

predicate should be a location path which is treated as true as long as the
adressed ressource exists.

rank is separated by ":" and allows to specify a subset of the result:

   child[?para]:2~-2  returns the child paragraph except the first and the
last one

This solves the issues (node-ordering) and (bracket-overload).

Regards/Mit freundlichen Gruessen
Bernhard Weichel              Phone:  (49) 711 811 8322
Robert Bosch GmbH               Fax:  (49) 711 811 260073
Dept. K3/EMW4                 eMail:  bernhard.weichel@de.bosch.com
P.O. Box 30 02 40                     
D-70442 Stuttgart
Received on Tuesday, 13 July 1999 11:47:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:02:13 UTC