<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml1/strict">

<xsl:include href="serverURL.xsl" />

<xsl:template match="response">
    <html>
      <body>
        <h1>Hierarchy Report</h1>
        <xsl:apply-templates/>
        <a>
        <xsl:attribute name="href"><xsl:value-of select="$serverURL"/>test-forms.html</xsl:attribute>
	Back to test form</a>
      </body>
    </html>
</xsl:template>

<xsl:template match="hierarchy">
    <h2>Hierarchy (
    <xsl:value-of select="@direction"/>)
    </h2>
    Maxlevel <xsl:value-of select="@maxlevels"/>
    <xsl:apply-templates/>
</xsl:template>

<xsl:template match="node[@id]">
    <a><xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>
    <blockquote>[<xsl:value-of select="@id"/>]<xsl:apply-templates/></blockquote>
    </a>
</xsl:template>

<xsl:template match="node">
    <blockquote>[--]<xsl:apply-templates/></blockquote>
</xsl:template>

<xsl:template match="noderef">
    <blockquote>[--]Refer <a><xsl:attribute name="href">#<xsl:value-of select="@ref"/></xsl:attribute>
[<xsl:value-of select="@ref"/>]</a></blockquote>
</xsl:template>

<xsl:template match="term">
       <b><a><xsl:attribute name="href">get-narrower?starting-term=<xsl:value-of select="."/>&amp;max-levels=-1&amp;format=term</xsl:attribute><xsl:value-of select="."/></a></b> 
		(<a><xsl:attribute name="href">query?operator=equals&amp;text=<xsl:value-of select="."/>&amp;fuzzy=false&amp;format=term-description</xsl:attribute>desc) </a>
</xsl:template>

</xsl:stylesheet>


