0
2
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
1
3
<xsl:output method="xml" indent="no"/>
2
4
<xsl:template match="people">
4
6
<head><title>Famous Scientists</title></head>
6
8
<ul><xsl:apply-templates select="person" mode="toc"/></ul>
7
9
<xsl:apply-templates select="person"/>
11
13
<!-- Table of Contents Mode Templates -->
12
14
<xsl:template match="person" mode="toc">
13
15
<xsl:apply-templates select="name" mode="toc"/>
15
17
<xsl:template match="name" mode="toc">
16
18
<li><xsl:value-of select="last_name"/>,
17
19
<xsl:value-of select="first_name"/></li>
19
21
<!-- Normal Mode Templates -->
20
22
<xsl:template match="person">
21
23
<p><xsl:apply-templates/></p>