<!--
//**************************************************************************
//*
//* CLASS .............. : Feuille de style de transformation d'un fichier 
//*                        Hydrometrie 1 au format HTML
//*
//* CREATION DATE ...... : Fevrier 2014
//*
//*
//**************************************************************************
--><xsl:stylesheet xmlns:a="http://xml.sandre.eaufrance.fr/scenario/bilan_epr/2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ref="http://xml.sandre.eaufrance.fr/scenario/referentiel/2" version="2.0" xpath-default-namespace="http://xml.sandre.eaufrance.fr/scenario/bilan_epr/2"><xsl:output method="html" encoding="UTF-8"/><xsl:param name="refFile"/><xsl:param name="refFilePAR"/><xsl:variable name="mergeResults"><xsl:apply-templates mode="copy" select="/"/></xsl:variable><xsl:template match="/"><xsl:apply-templates mode="transform" select="$mergeResults"/></xsl:template><xsl:template match="/BILAN_EPR" mode="copy"><xsl:message>BLUP 1: XSL REF FILE = <xsl:value-of select="$refFile"/></xsl:message><xsl:copy><xsl:apply-templates select="document($refFile)" mode="copy"/><xsl:apply-templates select="document($refFilePAR)" mode="copy"/><xsl:apply-templates mode="copy"/></xsl:copy></xsl:template><xsl:template match="*|@*|comment()|processing-instruction()|text()" mode="copy"><xsl:copy><xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()" mode="copy"/></xsl:copy></xsl:template>


	<!-- ================== -->
	<!-- = FORMATAGE DATE = -->
	<!-- ================== --><xsl:template name="formatDate"><xsl:param name="date"/><xsl:if test="$date"><xsl:value-of select="substring($date, 9, 2)"/>/<xsl:value-of select="substring($date, 6, 2)"/>/<xsl:value-of select="substring($date, 1, 4)"/></xsl:if></xsl:template>

	<!-- ================================================= -->
	<!-- = LIBELLE DE L'ORIGINE DU CODE D'UN INTERVENANT = -->
	<!-- ================================================= --><xsl:template name="origineCode"><xsl:param name="code"/><xsl:variable name="lib"><xsl:choose><xsl:when test="$code='SIRET'">Siret</xsl:when><xsl:when test="$code='SANDRE'">Sandre</xsl:when></xsl:choose></xsl:variable><xsl:value-of select="$lib"/></xsl:template>

	<!-- ======================== -->
	<!-- = DEFINITION DES CLES  = -->
	<!-- ======================== -->

	<!-- = CLE sur Intervenant par CdIntervenant  = --><xsl:key name="keyIntervenant" match="COM_LABO/Intervenant" use="CdIntervenant"/>

	<!-- = CLE sur GroupeParametres par CdGroupeParametres  = --><xsl:key name="keyGroupeParametres" match="COM_LABO/GroupeParametres" use="CdGroupeParametres"/>

	<!-- = CLE sur StationPrelevement par CdStationPrelevement  = --><xsl:key name="keyStationPrelevement" match="COM_LABO/StationPrelevement" use="CdStationPrelevement"/>

	<!-- = CLE Parametre par code parametre = -->
	<!--<xsl:key name="keyParametre" match="ref:REFERENTIEL/ref:Parametre" use="ref:CdParametre"/>--><xsl:key name="keyParametre" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel='PAR']/ref:Parametre" use="ref:CdParametre"/>

	<!-- = CLE Methode par code methode  = --><xsl:key name="keyMethode" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel='MET']/ref:Methode" use="ref:CdMethode"/>

	<!-- = CLE Unite de reference par code = --><xsl:key name="keyUniteReference" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel='URF']/ref:UniteReference" use="ref:CdUniteReference"/>

	<!-- = CLE Support par code = --><xsl:key name="keySupport" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel='SUP']/ref:Support" use="ref:CdSupport"/>

	<!-- = CLE FractionAnalysee par code = --><xsl:key name="keyFraction" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel='FAN']/ref:FractionAnalysee" use="ref:CdFractionAnalysee"/>

	<!-- = CLE Element de la nomenclature 22 (Projection des coordonnées) par code = --><xsl:key name="keyNomenclature22" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=22]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 76 (Système altimétrique de référence)  par code = --><xsl:key name="keyNomenclature76" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=76]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 156 (Type d'analyse) par code = --><xsl:key name="keyNomenclature156" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=156]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 215 (Norme Eau en AEP) par code = --><xsl:key name="keyNomenclature215" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=215]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 216 (Motif de prélèvement AEP) par code = --><xsl:key name="keyNomenclature216" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=216]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 232 (Type de demande) par code = --><xsl:key name="keyNomenclature232" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=232]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 233 (Type de demande) par code = --><xsl:key name="keyNomenclature233" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=233]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 295 (Type de demande) par code = --><xsl:key name="keyNomenclature295" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=295]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 296 (conformite du prélèvement) par code = --><xsl:key name="keyNomenclature296" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=296]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 297 (origine du code d'une station de prelevement) par code = --><xsl:key name="keyNomenclature297" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=297]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 299 (Accreditation de l'analyse) par code = --><xsl:key name="keyNomenclature299" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=299]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 300 (confirmation résultat analyse) par code = --><xsl:key name="keyNomenclature300" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=300]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 325 (Nature du produit) par code = --><xsl:key name="keyNomenclature325" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=325]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 329 (Usage du produit) par code = --><xsl:key name="keyNomenclature329" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=329]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 333 (Accréditation d'un prélèvement) par code = --><xsl:key name="keyNomenclature333" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=333]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 334 (Prélèvement sous réserve) par code = --><xsl:key name="keyNomenclature334" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=334]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 335 (Analyse sous reserve) par code = --><xsl:key name="keyNomenclature335" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=335]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 336 (contexte codification) par code = --><xsl:key name="keyNomenclature336" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=336]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 340 (complétude d'envoi) par code = --><xsl:key name="keyNomenclature340" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=340]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 244  par code = --><xsl:key name="keyNomenclature244" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=244]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 229  par code = --><xsl:key name="keyNomenclature229" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=229]/ref:Element" use="ref:CdElement"/>

	<!-- = CLE Element de la nomenclature 303  par code = --><xsl:key name="keyNomenclature303" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=303]/ref:Element" use="ref:CdElement"/>


	<!-- ============================================ -->
	<!-- ============================================ -->
	<!-- ============================================ -->
	<!-- ============================================ --><xsl:template match="/BILAN_EPR" mode="transform"><html><head><title>Transformation Hydrometrie V1</title><link rel="stylesheet" href="http://www.sandre.eaufrance.fr/squelettes/styles/style.css" type="text/css"/><link href="http://www.sandre.eaufrance.fr/lib/jquery.ui-1.6/themes/default/ui.all.css" media="all" type="text/css" rel="stylesheet"/><link rel="stylesheet" href="http://www.sandre.eaufrance.fr/plugins/jquery_table/style/style.css" type="text/css"/><script type="text/javascript" src="http://www.sandre.eaufrance.fr/prive/javascript/jquery.js"/><script type="text/javascript" src="http://www.sandre.eaufrance.fr/lib/jquery.ui-1.6/ui/jquery.ui.all.js"/><script src="http://www.sandre.eaufrance.fr/plugins/jquery_table/js/jquery_table.js" type="text/javascript"/><style type="text/css">.verticaltext {

    -webkit-transform:rotate(270deg);
    -moz-transform:rotate(270deg);
	-o-transform: rotate(270deg);
	-ms-transform: rotate(270deg);
	transform: rotate(270deg);
    white-space:nowrap;
    width:20px;
	color:#3d6098;

}</style></head><body><div class="Ottoman"><a name="haut"/><p align="right"><a href="http://www.sandre.eaufrance.fr/xmledi/xmlediCtrl?cmd=showForm">Convertir un nouveau fichier</a></p><ul><li><a href="#Caracteristiques" class="underline">Caractéristiques du fichier d'échanges</a></li><li><a href="#ListeInter" class="underline">Liste des intervenants et leurs fonctions dans le plan d'épandage</a></li><li><a href="#ListeExploit" class="underline">Liste des exploitations agricoles</a></li><li><a href="#campagne" class="underline">Campagne d'épandage pour la période du <xsl:value-of select="/BILAN_EPR/CampEpandage/DateDebutCampEpandage"/> au <xsl:value-of select="/BILAN_EPR/CampEpandage/DateFinCampEpandage"/> (<xsl:value-of select="key('keyNomenclature303', /BILAN_EPR/CampEpandage/EtatCampEpandage)/ref:LbElement"/>)</a></li><li><a href="#prelproduit" class="underline">Prélèvements et analyses effectués sur le produit d'épandage</a></li><li><a href="#parcelleperim" class="underline">Description des parcelles du périmètre et aptitude à l'épandage</a></li><li><a href="#pointsuivi" class="underline">Points de suivi</a></li><li><a href="#prelsol" class="underline">Prélèvements et analyses de sol</a></li><li><a href="#ouvrage" class="underline">Ouvrages de dépots</a></li><li><a href="#parcellepa" class="underline">Parcelles d'épandage</a></li></ul><br/><xsl:call-template name="carac"/><xsl:call-template name="listeinter"/><xsl:call-template name="exploit"/><xsl:call-template name="campagne"/><xsl:call-template name="prelproduit"/><xsl:call-template name="parcelleperim"/><xsl:call-template name="pointsuivi"/><xsl:call-template name="prelsol"/><xsl:call-template name="ouvrage"/><xsl:call-template name="parcellepa"/></div></body></html></xsl:template>




	<!-- ========================== -->
	<!-- = DETAILS DE LA DEMANDE  = -->
	<!-- ========================== --><xsl:template name="carac">

		<!--<xsl:call-template name="formatDate">
				<xsl:with-param name="date" select="DateDemande"/>
			</xsl:call-template>--><br/><br/><a name="Caracteristiques"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>I. CARACTERISTIQUES DU FICHIER D'ECHANGE</h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><div class="h2Suivant"><p class="descrpt"><b>Code du scénario :</b><xsl:value-of select="/BILAN_EPR/Scenario/CodeScenario"/></p><p class="descrpt"><b>Version du scénario :</b><xsl:value-of select="/BILAN_EPR/Scenario/VersionScenario"/></p><p class="descrpt"><b>Nom du scénario :</b><xsl:value-of select="/BILAN_EPR/Scenario/NomScenario"/></p><p class="descrpt"><b>Date de création du fichier :</b><xsl:value-of select="/BILAN_EPR/Scenario/DateCreationFichier"/></p><p class="descrpt"><b>Emetteur du fichier :</b><xsl:value-of select="/BILAN_EPR/Scenario/Emetteur/CdIntervenant"/>(<xsl:value-of select="/BILAN_EPR/Scenario/Emetteur/CdIntervenant/@schemeAgencyID"/>) (<xsl:value-of select="/BILAN_EPR/Scenario/Emetteur/NomIntervenant"/>)</p><p class="descrpt"><b>Destinataire du fichier :</b><xsl:value-of select="/BILAN_EPR/Scenario/Destinataire/CdIntervenant"/>(<xsl:value-of select="/BILAN_EPR/Scenario/Destinataire/CdIntervenant/@schemeAgencyID"/>) (<xsl:value-of select="/BILAN_EPR/Scenario/Destinataire/NomIntervenant"/>)</p></div></xsl:template>

	<!-- ========================== -->
	<!-- = liste intervenants     = -->
	<!-- ========================== --><xsl:template name="listeinter"><br/><br/><a name="ListeInter"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>II. LISTE DES INTERVENANTS</h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><xsl:if test="count(/BILAN_EPR/Intervenant) &gt; 0"><br/><table class="spip Ottoman sortable sticky" style="font-size:10px;" id="Intervenant"><thead><tr><th class="header">Code de l'intervenant</th><th class="header">Origine du code de l'intervenant</th><th class="header">Nom de l'intervenant</th><th class="header">Adresse de l'intervenant</th><th class="header">Commune d'implantation géographique</th><th class="header">Fonction dans le plan d'épandage</th></tr></thead><xsl:for-each select="/BILAN_EPR/Intervenant"><tr><td><xsl:value-of select="CdIntervenant"/></td><td><xsl:value-of select="CdIntervenant/@schemeAgencyID"/></td><td><xsl:value-of select="NomIntervenant"/></td><td><xsl:value-of select="BpIntervenant"/><xsl:text> </xsl:text><xsl:value-of select="ImmoIntervenant"/><xsl:text> </xsl:text><xsl:value-of select="RueIntervenant"/><xsl:text> </xsl:text><xsl:value-of select="LieuIntervenant"/><xsl:text> </xsl:text><xsl:value-of select="CPIntervenant"/><xsl:text> </xsl:text><xsl:value-of select="VilleIntervenant"/><xsl:text> </xsl:text><xsl:value-of select="PaysIntervenant"/></td><td><xsl:value-of select="Commune/CdCommune"/><xsl:text> </xsl:text><xsl:value-of select="Commune/LbCommune"/></td><td><xsl:call-template name="fction"><xsl:with-param name="code"><xsl:value-of select="CdIntervenant"/></xsl:with-param></xsl:call-template></td></tr></xsl:for-each></table></xsl:if></xsl:template><xsl:template name="fction"><xsl:param name="code"/><xsl:for-each select="/BILAN_EPR/CampEpandage/FctionIntervenantCampagne"><xsl:if test="Intervenant/CdIntervenant=$code"><xsl:value-of select="RoleIntCampEpandage"/>(<xsl:value-of select="key('keyNomenclature244', RoleIntCampEpandage)/ref:LbElement"/>)
				<br/></xsl:if></xsl:for-each></xsl:template>

	<!-- ========================== -->
	<!-- = liste exploit          = -->
	<!-- ========================== --><xsl:template name="exploit"><br/><br/><a name="ListeExploit"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>III. LISTE DES EXPLOITATIONS AGRICOLES</h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><xsl:if test="count(/BILAN_EPR/ExpAgri) &gt; 0"><br/><table class="spip Ottoman sortable sticky" style="font-size:10px;" id="Intervenant"><thead><tr><th class="header">Code de l'exploitation agricole</th><th class="header">Origine du code de l'exploitation agricole</th><th class="header">Libellé</th><th class="header">Coordonnée X</th><th class="header">Coordonnée Y</th><th class="header">Type de projection</th><th class="header">Surface Agricole Utile (SAU) en hectare</th><th class="header">Code INSEE commune</th><th class="header">Surface toujours en herbe (STH)</th><th class="header">Surface toujours labourable (STL)</th></tr></thead><xsl:for-each select="/BILAN_EPR/ExpAgri"><tr><td><xsl:value-of select="Exploitant/CdIntervenant"/></td><td><xsl:value-of select="Exploitant/CdIntervenant/@schemeAgencyID"/></td><td><xsl:value-of select="LbExpAgri"/></td><td><xsl:value-of select="CoordXExpAgri"/></td><td><xsl:value-of select="CoordYExpAgri"/></td><td><xsl:value-of select="TypeProjCoordExpAgri"/></td><td><xsl:value-of select="SAUExpAgri"/></td><td><xsl:value-of select="Commune/CdCommune"/></td><td><xsl:value-of select="STHExpAgri"/></td><td><xsl:value-of select="STLExpAgri"/></td></tr></xsl:for-each></table></xsl:if></xsl:template>

	<!-- ========================== -->
	<!-- = Campagne            = -->
	<!-- ========================== --><xsl:template name="campagne"><br/><br/><a name="campagne"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>IV. CAMPAGNE D'EPANDAGE POUR LA PERIODE DU <xsl:value-of select="/BILAN_EPR/CampEpandage/DateDebutCampEpandage"/> AU <xsl:value-of select="/BILAN_EPR/CampEpandage/DateFinCampEpandage"/> (<xsl:value-of select="key('keyNomenclature303', /BILAN_EPR/CampEpandage/EtatCampEpandage)/ref:LbElement"/>)</h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><br/><a name="idperim"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>Identification du périmètre</h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><br/><table class="spip Ottoman sortable sticky" style="font-size:10px;" id="Intervenant"><thead><tr><th class="unsortable"/><th class="unsortable"/></tr></thead><tr><td>Identification du périmètre d’épandage attribué par le pétitionnaire <br/>
								(code du pétitionnaire initial + Origine du code du pétitionnaire initial + Année de création du périmètre + Identifiant interne)</td><td><xsl:value-of select="/BILAN_EPR/CampEpandage/PdtEpandage/PerimetreEpandage/CdPerimetreEpandage"/></td></tr><tr><td>Libellé du périmètre</td><td><xsl:value-of select="/BILAN_EPR/CampEpandage/PdtEpandage/PerimetreEpandage/LbPerimetreEpandage"/></td></tr><tr><td>Code du pétitionnaire</td><td><xsl:value-of select="/BILAN_EPR/CampEpandage/PdtEpandage/PerimetreEpandage/Petitionnaire/CdIntervenant"/></td></tr><tr><td>Origine du code du pétitionnaire</td><td><xsl:value-of select="/BILAN_EPR/CampEpandage/PdtEpandage/PerimetreEpandage/Petitionnaire/CdIntervenant/@schemeAgencyID"/></td></tr><tr><td>Surface totale du périmètre</td><td><xsl:value-of select="/BILAN_EPR/CampEpandage/PdtEpandage/PerimetreEpandage/SurfTotPerimetre"/></td></tr><tr><td>Nature du terrain</td><td><xsl:value-of select="/BILAN_EPR/CampEpandage/PdtEpandage/PerimetreEpandage/NatureTerrainEpandage"/></td></tr></table><br/><a name="listreprod"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>Liste des lots de produits du périmètre</h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><xsl:if test="count(/BILAN_EPR/CampEpandage/PdtEpandage/LotPdt) &gt; 0"><xsl:for-each select="/BILAN_EPR/CampEpandage/PdtEpandage/LotPdt"><br/><table class="spip Ottoman sortable sticky" style="font-size:10px;" id="Intervenant"><thead><tr><th class="unsortable" colspan="2">Produit d'épandage</th><th class="unsortable" colspan="4">Lot du produit d'épandage</th></tr><tr><th class="header">Code du produit d'épandage</th><th class="header">Libellé du produit d'épandage</th><th class="header">Numéro du lot</th><th class="header">Date de début de production du lot</th><th class="header">Date de fin de production du lot</th><th class="header">Quantité du lot</th></tr></thead><tr><td><xsl:value-of select="../CdPdtEpandage"/></td><td><xsl:value-of select="../LbPdtEpandage"/></td><td><xsl:value-of select="NumLotPdt"/></td><td><xsl:value-of select="DateDebLotPdt"/></td><td><xsl:value-of select="DateFinLotPdt"/></td><td><xsl:value-of select="QteTotLotPdt"/></td></tr></table></xsl:for-each></xsl:if></xsl:template>

	<!-- ========================== -->
	<!-- = prelproduit            = -->
	<!-- ========================== --><xsl:template name="prelproduit"><br/><br/><a name="prelproduit"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>V. PRELEVEMENTS ET ANALYSES EFFECTUES SUR LE PRODUIT D'EPANDAGE <xsl:value-of select="/BILAN_EPR/CampEpandage/PdtEpandage/CdPdtEpandage"/></h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><xsl:if test="count(/BILAN_EPR/CampEpandage/PdtEpandage/PrlvtEffluent/AnalyseEffluent) &gt; 0"><br/><table class="spip Ottoman sortable sticky" style="font-size:10px;" id="Intervenant"><thead><tr><th class="unsortable" colspan="5">Prélèvements</th><th class="unsortable" colspan="8">Analyses</th></tr><tr><th class="header">Date du prélèvement</th><th class="header">Point de mesure</th><th class="header">Support prélevé</th><th class="header">Lot(s) prélevé(s)</th><th class="header">Code Preleveur</th><th class="header">Numéro d'analyse</th><th class="header">Nature de l'analyse</th><th class="header">Paramètre</th><th class="header">Méthode d'analyse</th><th class="header">Fraction analysée</th><th class="header">Code remarque</th><th class="header">Résultat d'analyse</th><th class="header">Unité de mesure</th></tr></thead><xsl:for-each select="/BILAN_EPR/CampEpandage/PdtEpandage/PrlvtEffluent/AnalyseEffluent"><tr><td><xsl:value-of select="../DatePrlvtEffluent"/></td><td><xsl:value-of select="../PointMesureOuvrage/LocGlobPointMesureOuvrage"/></td><td><xsl:value-of select="../Support/CdSupport"/></td><td><xsl:value-of select="../LotPdt/NumLotPdt"/></td><td><xsl:value-of select="../Preleveur/CdIntervenant"/></td><td><xsl:value-of select="NumeroAnalyse"/></td><td><xsl:value-of select="NatureAnalyse"/></td><td><xsl:value-of select="key('keyParametre', Parametre/CdParametre)/ref:NomParametre"/>(<xsl:value-of select="Parametre/CdParametre"/>)</td><td><xsl:value-of select="key('keyMethode', Methode/CdMethode)/ref:LbLongMethode"/>(<xsl:value-of select="Methode/CdMethode"/>)</td><td><xsl:value-of select="key('keyFraction', FractionAnalysee/CdFractionAnalysee)/ref:LbFractionAnalysee"/>(<xsl:value-of select="FractionAnalysee/CdFractionAnalysee"/>)</td><td><xsl:value-of select="CdRemAnalyse"/></td><td><xsl:value-of select="RsAnalyse"/></td><td><xsl:value-of select="key('keyUniteReference', UniteMesure/CdUniteReference)/ref:SymUniteReference"/>(<xsl:value-of select="UniteMesure/CdUniteReference"/>)</td></tr></xsl:for-each></table></xsl:if></xsl:template>

	<!-- ========================== -->
	<!-- = parcelleperim          = -->
	<!-- ========================== --><xsl:template name="parcelleperim"><br/><br/><a name="parcelleperim"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>VI. DESCRIPTION DES PARCELLES DU PERIMETRE ET APTITUDE A L'EPANDAGE</h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><xsl:if test="count(/BILAN_EPR/CampEpandage/PdtEpandage/PerimetreEpandage/ParcellePerimetre/AptParcelle) &gt; 0"><br/><table class="spip Ottoman sortable sticky" style="font-size:10px;" id="Intervenant"><thead><tr><th class="unsortable" colspan="8">Parcelles du périmètre</th><th class="unsortable" colspan="3">Aptitude à l'épandage</th></tr><tr><th class="header">Code de la parcelle du périmètre</th><th class="header">Libellé de la parcelle du périmètre</th><th class="header">Période d'entrée  et de sortie de la parcelle dans le périmètre</th><th class="header">Parcelle d'épandage</th><th class="header">Lieu-dit</th><th class="header">Surface de la parcelle (ha)</th><th class="header">Code et origine du code de l’exploitation agricole</th><th class="header">Code INSEE Commune d'implantation</th><th class="header">Code du produit d'épandage</th><th class="header">Classe d'aptitude</th><th class="header">Surface d'aptitude de la parcelle</th></tr></thead><xsl:for-each select="/BILAN_EPR/CampEpandage/PdtEpandage/PerimetreEpandage/ParcellePerimetre/AptParcelle"><tr><td><xsl:value-of select="../CdParcellePerimetre"/></td><td><xsl:value-of select="../LbParcellePerimetre"/></td><td><xsl:value-of select="../DateEntreeParcellePerimetre"/><xsl:text> / </xsl:text><xsl:value-of select="../DateSortieParcellePerimetre"/></td><td><xsl:call-template name="codePar"><xsl:with-param name="code"><xsl:value-of select="../CdParcellePerimetre"/></xsl:with-param></xsl:call-template></td><td><xsl:value-of select="../LieuditParcellePerimetre"/></td><td><xsl:value-of select="../SurfParcellePerimetre"/></td><td><xsl:value-of select="../Champ/ExpAgriGerante/Exploitant/CdIntervenant"/>(<xsl:value-of select="../Champ/ExpAgriGerante/Exploitant/CdIntervenant/@schemeAgencyID"/>)</td><td><xsl:value-of select="../Commune/CdCommune"/></td><td><xsl:value-of select="PdtEpandage/CdPdtEpandage"/></td><td><xsl:value-of select="key('keyNomenclature229', ClasseApt/CdClasseApt)/ref:LbElement"/>(<xsl:value-of select="ClasseApt/CdClasseApt"/>)</td><td><xsl:value-of select="SurfAptParcelle"/></td></tr></xsl:for-each></table></xsl:if></xsl:template><xsl:template name="codePar"><xsl:param name="code"/><xsl:for-each select="/BILAN_EPR/CampEpandage/ParcelleEpandage"><xsl:if test="ParcellePerimetre/CdParcellePerimetre=$code"><xsl:value-of select="CdParcelleEpandage"/><br/></xsl:if></xsl:for-each></xsl:template>



	<!-- ========================== -->
	<!-- = pointsuivi          = -->
	<!-- ========================== --><xsl:template name="pointsuivi"><br/><br/><a name="pointsuivi"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>VII. POINTS DE SUIVI</h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><xsl:if test="count(/BILAN_EPR/CampEpandage/PointSuivi) &gt; 0"><br/><table class="spip Ottoman sortable sticky" style="font-size:10px;" id="Intervenant"><thead><tr><th class="header">Code du point de suivi</th><th class="header">Libellé du point de suivi</th><th class="header">Type de point de suivi</th><th class="header">Code de la parcelle du périmètre</th></tr></thead><xsl:for-each select="/BILAN_EPR/CampEpandage/PointSuivi"><tr><td><xsl:value-of select="CdPointSuivi"/></td><td><xsl:value-of select="LbPointSuivi"/></td><td><xsl:value-of select="key('keyNomenclature232', TypePointSuivi)/ref:LbElement"/>(<xsl:value-of select="TypePointSuivi"/>)</td><td><xsl:value-of select="LocalisationParcelle/CdParcellePerimetre"/></td></tr></xsl:for-each></table></xsl:if></xsl:template>


	<!-- ========================== -->
	<!-- = prelsol                = -->
	<!-- ========================== --><xsl:template name="prelsol"><br/><br/><a name="prelsol"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>VIII. PRELEVEMENTS ET ANALYSES DE SOL</h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><xsl:if test="count(/BILAN_EPR/CampEpandage/PointSuivi/PrlvtTerre/AnaSol) &gt; 0"><br/><table class="spip Ottoman sortable sticky" style="font-size:10px;" id="Intervenant"><thead><tr><th class="unsortable" colspan="4">Parcelles du périmètre</th><th class="unsortable" colspan="7">Aptitude à l'épandage</th></tr><tr><th class="header">Date de prélèvement</th><th class="header">Code du point de suivi</th><th class="header">Support prélevé</th><th class="header">Préleveur</th><th class="header">Nature de l'analyse de sol</th><th class="header">Paramètre analysé</th><th class="header">Méthode d'analyse</th><th class="header">Fraction analysée</th><th class="header">Code remarque</th><th class="header">Résultat d'analyse</th><th class="header">Unité de mesure</th></tr></thead><xsl:for-each select="/BILAN_EPR/CampEpandage/PointSuivi/PrlvtTerre/AnaSol"><tr><td><xsl:value-of select="../DatePrlvtTerre"/></td><td><xsl:value-of select="../../CdPointSuivi"/></td><td><xsl:value-of select="../Support/CdSupport"/></td><td><xsl:value-of select="../Preleveur/CdIntervenant"/>(<xsl:value-of select="../Preleveur/CdIntervenant/@schemeAgencyID"/>)</td><td><xsl:value-of select="NatureAnaSol"/></td><td><xsl:value-of select="key('keyParametre', Parametre/CdParametre)/ref:NomParametre"/>(<xsl:value-of select="Parametre/CdParametre"/>)</td><td><xsl:value-of select="key('keyMethode', Methode/CdMethode)/ref:LbLongMethode"/>(<xsl:value-of select="Methode/CdMethode"/>)</td><td><xsl:value-of select="key('keyFraction', FractionAnalysee/CdFractionAnalysee)/ref:LbFractionAnalysee"/>(<xsl:value-of select="FractionAnalysee/CdFractionAnalysee"/>)</td><td><xsl:if test="RqAnaSol=1">Egal</xsl:if><xsl:if test="RqAnaSol=2">Inférieur</xsl:if><xsl:if test="RqAnaSol=9">Inférieur</xsl:if><xsl:if test="RqAnaSol=3">Supérieur</xsl:if><xsl:if test="RqAnaSol=8">Supérieur</xsl:if><xsl:if test="RqAnaSol=4"><xsl:if test="RsAnaSol=1">Présence</xsl:if><xsl:if test="RsAnaSol=2">Absence</xsl:if></xsl:if></td><td><xsl:value-of select="RsAnaSol"/></td><td><xsl:value-of select="key('keyUniteReference', UniteMesure/CdUniteReference)/ref:SymUniteReference"/>(<xsl:value-of select="UniteMesure/CdUniteReference"/>)</td></tr></xsl:for-each></table></xsl:if></xsl:template>


	<!-- ========================== -->
	<!-- = ouvrage                = -->
	<!-- ========================== --><xsl:template name="ouvrage"><br/><br/><a name="ouvrage"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>IX. OUVRAGES DE DEPOTS</h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><xsl:if test="count(/BILAN_EPR/CampEpandage/OuvrageDepot) &gt; 0"><br/><table class="spip Ottoman sortable sticky" style="font-size:10px;" id="Intervenant"><thead><tr><th class="header">Code de l'ouvrage de dépot</th><th class="header">Type d’ouvrage de dépôt</th><th class="header">Libellé de l'ouvrage de dépot</th><th class="header">Description</th><th class="header">Code INSEE Commune</th><th class="header">Volume de stockage (m3)</th><th class="header">Aire utile de stockage (m2)</th></tr></thead><xsl:for-each select="/BILAN_EPR/CampEpandage/OuvrageDepot"><tr><td><xsl:value-of select="CdOuvrageDepot"/></td><td><xsl:value-of select="key('keyNomenclature303', TypeOuvrageDepot)/ref:LbElement"/>(<xsl:value-of select="TypeOuvrageDepot"/>)</td><td><xsl:value-of select="LbOuvrageDepot"/></td><td><xsl:value-of select="DsOuvrageDepot"/></td><td><xsl:value-of select="Commune/CdCommune"/></td><td><xsl:value-of select="VolStockOuvrageDepot"/></td><td><xsl:value-of select="AireUtileOuvrageDepot"/></td></tr></xsl:for-each></table></xsl:if></xsl:template>

	
<!-- ========================== -->
	<!-- = parcellepa             = -->
	<!-- ========================== --><xsl:template name="parcellepa"><br/><br/><a name="parcellepa"/><table width="100%" style="font-size:10px;"><tr><td width="98%"><h2>X. PARCELLES D'EPANDAGE</h2></td><td width="2%"><a href="#haut"><img src="http://www.sandre.eaufrance.fr/squelettes/images/haut_Ottoman.png" title="Retour en haut de la page" alt="Retour en haut de la page"/></a></td></tr></table><xsl:if test="count(/BILAN_EPR/CampEpandage/ParcelleEpandage) &gt; 0"><br/><table class="spip Ottoman sortable sticky" style="font-size:10px;" id="Intervenant"><thead><tr><th class="header">Code de la parcelle d'épandage</th><th class="header">Libellé de la parcelle d'épandage</th><th class="header">Code de la parcelle du périmètre</th><th class="header">Surface de la parcelle d'épandage</th><th class="header">Date d'épandage</th><th class="header">Lot épandu</th><th class="header">Quantité de lot épandu</th></tr></thead><xsl:for-each select="/BILAN_EPR/CampEpandage/ParcelleEpandage"><tr><td><xsl:value-of select="CdParcelleEpandage"/></td><td><xsl:value-of select="LbParcelleEpandage"/></td><td><xsl:value-of select="ParcellePerimetre/CdParcellePerimetre"/></td><td><xsl:value-of select="SurfEpandageParcelle"/></td><td><xsl:value-of select="DateEpandageParcelle"/></td><td><xsl:value-of select="LotEpandu/NumLotPdt"/></td><td><xsl:value-of select="LotEpandu/QteLotPdt"/></td></tr></xsl:for-each></table></xsl:if></xsl:template></xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2009. Progress Software Corporation. All rights reserved.

<metaInformation>
	<scenarios>
		<scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="BILAN_EPR_valide.xml" htmlbaseurl="" outputurl="" processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml=""
		          commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator="">
			<parameterValue name="refFile" value="'http://xml.sandre.eaufrance.fr/exist/sandre/Referentiels/ref_xmledi.xml'"/>
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bGenerateByteCode" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="xsltVersion" value="2.0"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
	</scenarios>
	<MapperMetaTag>
		<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no">
			<SourceSchema srcSchemaPath="..\Desc_EPR\DESC_EPR_2.1.xml" srcSchemaRoot="DESC_EPR" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/>
		</MapperInfo>
		<MapperBlockPosition>
			<template match="/"></template>
			<template name="carac">
				<block path="div/p/xsl:value-of" x="460" y="192"/>
				<block path="div/p[1]/xsl:value-of" x="500" y="192"/>
				<block path="div/p[2]/xsl:value-of" x="420" y="192"/>
				<block path="div/p[3]/xsl:value-of" x="380" y="192"/>
				<block path="div/p[4]/xsl:value-of" x="340" y="192"/>
				<block path="div/p[5]/xsl:value-of" x="300" y="192"/>
				<block path="div/p[6]/xsl:value-of" x="260" y="192"/>
				<block path="div/p[7]/xsl:value-of" x="220" y="192"/>
				<block path="div/p[7]/xsl:value-of[1]" x="180" y="192"/>
				<block path="div/p[8]/xsl:value-of" x="140" y="192"/>
				<block path="div/p[8]/xsl:value-of[1]" x="100" y="192"/>
			</template>
		</MapperBlockPosition>
		<TemplateContext></TemplateContext>
		<MapperFilter side="source"></MapperFilter>
	</MapperMetaTag>
</metaInformation>
-->