<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	
<xsl:param name="nomImage"/> 

<xsl:output method="html" encoding="UTF-8"  indent="yes" />

<xsl:template match="set">
	<!-- <div id="info_galerie"><xsl:value-of select="info/identifier"/><br/>
	<xsl:value-of select="info/description"/><br/>
	<xsl:value-of select="info/rights/unqualified"/> : <xsl:value-of select="info/creator/unqualified"/> / <xsl:value-of select="info/date[0]"/>
	/ <xsl:value-of select="info/date[1]"/></div> -->
	<xsl:apply-templates select="record"/>
</xsl:template>

<xsl:template match="record">
	<xsl:if test="info/identifier = $nomImage">
		<xsl:call-template name="body"/>
	</xsl:if>
</xsl:template>

<xsl:template name="body">
		<xsl:if test="title/proper !=''"><xsl:value-of select="title/proper"/>, </xsl:if>
		<xsl:if test="info/date/unqualified !=''"><xsl:value-of select="info/date/unqualified"/>.<br/></xsl:if>
		<small>Tous droits réservés
		<xsl:if test="info/publisher/unqualified !=''">,<br/><xsl:value-of select="info/publisher/unqualified"/></xsl:if></small>
		<!-- <p>Résumé : <xsl:value-of select="description"/></p>-->
 		<p>Filtres :<br/>
		<ul>
			<xsl:apply-templates select="coverage/place/geoname/location/country"/>
			<xsl:apply-templates select="coverage/place/geoname/location/region"/>
			<xsl:apply-templates select="coverage/place/geoname/location/locality"/>
			<xsl:apply-templates select="subject/topicname"/>
		</ul> 
		</p>
</xsl:template>

<xsl:template match="coverage/place/geoname/location/country">
		<li><a><xsl:attribute name="href">?motclef=<xsl:value-of select="."/></xsl:attribute><xsl:value-of select="."/></a></li>
</xsl:template>

<xsl:template match="coverage/place/geoname/location/region">
		<li><a><xsl:attribute name="href">?motclef=<xsl:value-of select="."/></xsl:attribute><xsl:value-of select="."/></a></li>
</xsl:template>

<xsl:template match="coverage/place/geoname/location/locality">
		<li><a><xsl:attribute name="href">?motclef=<xsl:value-of select="."/></xsl:attribute><xsl:value-of select="."/></a></li>
</xsl:template>

<xsl:template match="subject/topicname">
		<li><a><xsl:attribute name="href">?motclef=<xsl:value-of select="."/></xsl:attribute><xsl:value-of select="."/></a></li>
</xsl:template>

</xsl:stylesheet>

