Patterns in XSLT 3.0

XSLT 3.0 introduces a new pattern syntax .[expression]: this matches any item for which the effective boolean value of the expression (evaluated with that item as the context item) is true. For example .[. gt 0] will match any item (either an atomic number, or a node that atomizes to a number) if it is greater than zero, while .[nilled()] matches any element that is nilled (@xsi:nil='true'). Note that if the predicate cannot be evaluated because the item is of the wrong type, no error occurs, the pattern simply does not match.

Other XSLT 3.0 extensions to patterns that are implemented since Saxon 9.6 include the following: