NOTE:
These slides have not been updated since 2003. They have been superseded by the book
Anders Møller and Michael Schwartzbach, February 2006 |
THE XML REVOLUTION - TECHNOLOGIES FOR THE FUTURE WEB |
A given node matches a given pattern if:
Operationally (and intuitively), a pattern matching is probably best evaluated backwards (from
right to left).
Recall the structure of XPath node-set expressions:
pattern: | location path | ... | location path | |
location path: | /step/ ... // ... /step | |
step: | axis nodetest predicate |
A simple example is:
match="section/subsection | appendix//subsection" |
which matches subsection elements occurring either as child elements of section elements or as descendants of appendix elements.
These figures illustrate the pattern matching
mechanism.
COPYRIGHT © 2000-2003 ANDERS MØLLER & MICHAEL I. SCHWARTZBACH |