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
(www.ovidius.com):

   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)

   child[?para]

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

   child[data?introduction]   all children containing the text
"introduction)
   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
Germany
Received on Tuesday, 13 July 1999 11:47:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:05:53 GMT