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 2000 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified September 23, 1999