Is there a way to write an XSL 1.0 template which is matching in all modes?
Or do I have to write a separate template for every existing mode (including additional templates for modes being added in the future)?
Here is what I have:
<xsl:apply-templates mode='mode1' /> ... <xsl:apply-templates mode='mode2' /> ... <!-- Do not process text content of nodes no matter in what mode --> <!-- Is there a way to have only one template here? --> <xsl:template match='text()' mode='mode1' /> <xsl:template match='text()' mode='mode2' />
The predefined mode:
#all(only available in XSLT 2.0 however).edit: replicating shared mode behaviour with 1.0