The xsl:match Instruction

See xsl:match

This instruction is most useful if wrapped in a stylesheet function. For example:

<xsl:function name="f:in-appendix" as="xs:boolean"> <xsl:param name="content" as="element(*)"/> <xsl:match select="$content" pattern="chapter[@class='appendix']//* | addendum//*"/> </xsl:function> ... <xsl:if test="f:in-appendix(.)">...</xsl:if>