The Or Operator in Match Patterns

Since all four template rules for the HTML element have the same content, we can combine them into a single rule that applies to each of the four using the or operator |

  <xsl:template match="p|ul|li|cite">
    <xsl:copy>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>  

The output is the same
Previous | Next | Top | Cafe con Leche

Copyright 1999-2001 Elliotte Rusty Harold
Elliotte Rusty Harold
Last Modified September 23, 1999