<?xml version="1.0" encoding="utf-8" standalone="no"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">

<xsl:template match="/">
<html>
    <head>
    <title>Imaginary Library Staff</title>
    </head>
    <body>
        <h1>Imaginary Library Staff</h1>
        <p>Note: Although the libraries are imaginary, the staff are not!</p>
        <xsl:apply-templates select="//person"/>
    </body>
</html>
</xsl:template>

<xsl:template match="person">
<h2 class="person"><xsl:value-of select="name"/></h2>
<p>
<b class="jobtitle"><xsl:value-of select="title"/></b>
 – <span class="department"><xsl:value-of select="ancestor::department/name"/></span>
 – <span class="library"><xsl:value-of select="ancestor::library/name"/></span>
<br/>
Phone: <span class="phone"><xsl:value-of select="phone"/></span>
<br/>
Email: <span class="email"><xsl:value-of select="email"/></span>
</p>
</xsl:template>

</xsl:stylesheet>
