Suppose we have:
<syllabus> <name>XML and Related Technologies</name> <office-hours>103B South Hall at Monday 2-3:30pm and Wednesday 2-3:30pm</office-hours> <short-description>...</short-description> <schedule>...</schedule> </syllabus>
This is extra work:
<xsl:template match="syllabus"> <div> <p>Course Summary:</p> <xsl:apply-templates select="/syllabus/name"/> <xsl:apply-templates select="/syllabus/short-description"/> </div> </xsl:template>
This is much better and more flexible:
<xsl:template match="syllabus"> <div> <p>Course Summary:</p> <xsl:apply-templates select="name|short-description"/> </div> </xsl:template>