3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
6 <xsl:import href="common.xsl"/>
8 <xsl:output method="xml"/>
10 <xsl:template match="people">
13 <title>People Directory</title>
18 <table border="0" width="100%">
22 <h3><a name="#site">By Site</a></h3>
23 <xsl:apply-templates select="from"/>
28 <h3><a name="#alpha">Alphabetical</a></h3>
29 <xsl:apply-templates select="from/person" mode="alphabetical">
30 <xsl:sort select="@file"/>
31 </xsl:apply-templates>
40 <xsl:template match="person">
41 <xsl:variable name="person" select="document(concat('../xml/people/',../@site,'/',@file,'.xml'))/person"/>
42 <a href="people/{../@site}/{@file}.html">
43 <xsl:call-template name="person-name">
44 <xsl:with-param name="file" select="concat(../@site,'/',@file)"/>
50 <xsl:template match="person" mode="alphabetical">
51 <xsl:variable name="person" select="document(concat('../xml/people/',../@site,'/',@file,'.xml'))/person"/>
52 <a href="people/{../@site}/{@file}.html">
53 <xsl:value-of select="$person/surname"/>
54 <xsl:text>, </xsl:text>
55 <xsl:value-of select="$person/name"/>
60 <xsl:template match="name">
61 <xsl:param name="file" select="''"/>
62 <h4><a href="sites/{$file}.html"><xsl:value-of select="."/></a></h4>
65 <xsl:template match="from">
66 <xsl:variable name="site" select="document(concat('../xml/sites/',@site,'.xml'))/site"/>
67 <xsl:apply-templates select="$site/name | $site/subsite[1]/name">
68 <xsl:with-param name="file" select="@site"/>
69 </xsl:apply-templates>
70 <xsl:apply-templates select="person">
71 <xsl:sort select="@file"/>
72 </xsl:apply-templates>