Match Patterns (Locating Elements)

One critical capability of a stylesheet language is to locate source elements to be styled. CSS, for example, does this with "selectors." FOSIs do it with "e-i-c's", elements in context. XSLT does it with "match patterns" defined by XPath.

para

Matches all <para> children in the current context

para/emphasis

Matches all <emphasis> elements that have a parent of <para>

ancestor-or-self::*/@sepchar

Matches the sepchar attribute on the current element or any ancestor of the current element

numberedlist/listitem[position() mod 2 = 0]

Matches odd listitems in a numbered list.