to the main page about the tutorial  THE XML REVOLUTION  -  TECHNOLOGIES FOR THE FUTURE WEB back up next

Location steps

A single location step has the form

    axis :: node-test [ predicate ]

The candidates that survive the filtration constitute the result.

This structure of location steps makes implementation rather easy and efficient, since the complex predicates are only evaluated on relatively few nodes.


The example from before:
  child::section[position()<6] / descendant::cite / attribute::href

selects all href attributes in cite elements in the first 5 sections of an article document.

back COPYRIGHT © 2000-2003 ANDERS MØLLER & MICHAEL I. SCHWARTZBACH next