Expressions

To meet the need to specify contextual relationships between elements and other markup constructs, the value of the Match attribute is actually an expression (as defined in the XPath specification). The Match attribute in the example below contains a simple expression (explained below):

match="warning/para"

Expressions are also used in other places in XSLT, but this chapter focuses on their use in the Match attribute, to specify a context for the template.

To be more precise, the Match attribute actually holds a particular type of expression, known as a pattern. A pattern is a context specification, against which the current node is compared. Only some parts of the wider expression language are relevant for this need.

Note that, ...

Get XSL companion, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.