<?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 Services</title>
    </head>
    <body>
        <h1>Imaginary Library Services</h1>
        <p>Services provided by the imaginary libraries</p>
        <p>
        [Unfortunately, I couldn’t get this transformation to produce the HTML
        I really wanted – i.e., each distinct service listed just once.]
        </p>
        <xsl:apply-templates select="//services/service"/>
    </body>
</html>
</xsl:template>

<xsl:template match="service">
<h2 class="service"><xsl:value-of select='name'/></h2>
<blockquote class="description"><xsl:value-of select="description"/></blockquote>
<p class="library"><xsl:value-of select="ancestor::library/name"/></p>
</xsl:template>

</xsl:stylesheet>
