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">
24 <xsl:sort select="@site"/>
25 </xsl:apply-templates>
30 <h3><a name="#alpha">Alphabetical</a></h3>
31 <xsl:apply-templates select="from/person" mode="alphabetical">
32 <xsl:sort select="@file"/>
33 </xsl:apply-templates>
42 <xsl:template match="person">
43 <xsl:variable name="person" select="document(concat('../xml/people/',../@site,'/',@file,'.xml'))/person"/>
44 <a href="people/{../@site}/{@file}.html">
45 <xsl:call-template name="person-name">
46 <xsl:with-param name="file" select="concat(../@site,'/',@file)"/>
52 <xsl:template match="person" mode="alphabetical">
53 <xsl:variable name="person" select="document(concat('../xml/people/',../@site,'/',@file,'.xml'))/person"/>
54 <a href="people/{../@site}/{@file}.html">
55 <xsl:value-of select="$person/surname"/>
56 <xsl:text>, </xsl:text>
57 <xsl:value-of select="$person/name"/>
62 <xsl:template match="name">
63 <xsl:param name="file" select="''"/>
64 <h4><a href="sites/{$file}.html"><xsl:value-of select="."/></a></h4>
67 <xsl:template match="from">
68 <xsl:variable name="site" select="document(concat('../xml/sites/',@site,'.xml'))/site"/>
69 <xsl:apply-templates select="$site/name | $site/subsite[1]/name">
70 <xsl:with-param name="file" select="@site"/>
71 </xsl:apply-templates>
72 <xsl:apply-templates select="person"/>