<!--
//**************************************************************************
//*
//* CLASS .............. : Feuille de style de transformation d'un fichier 
//*                        Hydrometrie 1 au format PDF
//*
//* CREATION DATE ...... : Fevrier 2014
//*
//*
//**************************************************************************
--><xsl:stylesheet xmlns:a="http://xml.sandre.eaufrance.fr/scenario/hydrometrie/1" xmlns:fo="http://www.w3.org/1999/XSL/Format" 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/hydrometrie/1"><xsl:output method="xml" version="1.0" encoding="ISO-8859-1"/><xsl:param name="refFile"/><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="/hydrometrie" mode="copy"><xsl:message>XSL REF FILE = <xsl:value-of select="$refFile"/></xsl:message><xsl:copy><xsl:apply-templates select="document($refFile)" 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><xsl:attribute-set name="Titre"><xsl:attribute name="border">1px solid black</xsl:attribute><xsl:attribute name="background-color">#c0c0c0</xsl:attribute><xsl:attribute name="font-weight">bold</xsl:attribute><xsl:attribute name="font-family">Helvetica</xsl:attribute><xsl:attribute name="font-size">14pt</xsl:attribute><xsl:attribute name="padding">.75em 0</xsl:attribute><xsl:attribute name="space-before">12pt</xsl:attribute><xsl:attribute name="space-after">12pt</xsl:attribute><xsl:attribute name="text-align">center</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="Titre14"><xsl:attribute name="border">none</xsl:attribute><xsl:attribute name="background-color">#c0c0c0</xsl:attribute><xsl:attribute name="font-family">Helvetica</xsl:attribute><xsl:attribute name="font-weight">bold</xsl:attribute><xsl:attribute name="font-size">14pt</xsl:attribute><xsl:attribute name="padding">6pt 0</xsl:attribute><xsl:attribute name="text-decoration">underline</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="Titre12"><xsl:attribute name="border">none</xsl:attribute><xsl:attribute name="font-family">Helvetica</xsl:attribute><xsl:attribute name="font-weight">bold</xsl:attribute><xsl:attribute name="font-size">12pt</xsl:attribute><xsl:attribute name="margin">3pt 0</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="Label"><xsl:attribute name="font-family">Helvetica</xsl:attribute><xsl:attribute name="font-weight">bold</xsl:attribute><xsl:attribute name="vertical-align">text-top</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="Label14" use-attribute-sets="Label"><xsl:attribute name="font-size">14pt</xsl:attribute><xsl:attribute name="padding">6pt 2pt</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="Label12" use-attribute-sets="Label"><xsl:attribute name="font-size">12pt</xsl:attribute><xsl:attribute name="padding">3pt 2pt</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="Label10" use-attribute-sets="Label"><xsl:attribute name="font-size">10pt</xsl:attribute><xsl:attribute name="padding">1.5pt 2pt</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="Value"><xsl:attribute name="font-family">Helvetica</xsl:attribute><xsl:attribute name="vertical-align">text-top</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="Value14" use-attribute-sets="Value"><xsl:attribute name="font-size">14pt</xsl:attribute><xsl:attribute name="padding">6pt 2pt</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="Value12" use-attribute-sets="Value"><xsl:attribute name="font-size">12pt</xsl:attribute><xsl:attribute name="padding">3pt 2pt</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="Value10" use-attribute-sets="Value"><xsl:attribute name="font-size">10pt</xsl:attribute><xsl:attribute name="padding">1.5pt 2pt</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="bord"><xsl:attribute name="table-layout">fixed</xsl:attribute><xsl:attribute name="font-family">Helvetica</xsl:attribute><xsl:attribute name="border">1px solid black</xsl:attribute><xsl:attribute name="border-collapse">collapse</xsl:attribute><xsl:attribute name="space-before">12pt</xsl:attribute><xsl:attribute name="space-after">12pt</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="allBord"><xsl:attribute name="table-layout">fixed</xsl:attribute><xsl:attribute name="font-family">Helvetica</xsl:attribute><xsl:attribute name="border">1px solid black</xsl:attribute><xsl:attribute name="border-collapse">collapse</xsl:attribute><xsl:attribute name="space-before">12pt</xsl:attribute><xsl:attribute name="space-after">12pt</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="cell"><xsl:attribute name="language">fr</xsl:attribute><xsl:attribute name="hyphenate">true</xsl:attribute><xsl:attribute name="border">1px solid black</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="cellH" use-attribute-sets="cell"><xsl:attribute name="text-align">center</xsl:attribute><xsl:attribute name="background-color">#c0c0c0</xsl:attribute><xsl:attribute name="font-weight">bold</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="verticaltext"><xsl:attribute name="writing-mode">tb-rl</xsl:attribute><xsl:attribute name="filter">flipv fliph</xsl:attribute></xsl:attribute-set><xsl:attribute-set name="verticaltext2"><xsl:attribute name="block-progression">lr</xsl:attribute><xsl:attribute name="writing-mode">tb-rl</xsl:attribute></xsl:attribute-set>

	<!-- ================== -->
	<!-- = 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'">Sandr</xsl:when></xsl:choose></xsl:variable><xsl:value-of select="$lib"/></xsl:template>

	<!-- ====================== -->
	<!-- = DEFINITION PUCE 1  = -->
	<!-- ====================== --><xsl:variable name="puce1"><fo:inline font-weight="normal" font-family="ZapfDingbats">?</fo:inline></xsl:variable>

	<!-- ====================== -->
	<!-- = DEFINITION PUCE 2  = -->
	<!-- ====================== --><xsl:variable name="puce2"><fo:inline font-weight="normal" font-size="1.5em" font-family="ZapfDingbats">?</fo:inline></xsl:variable>
	<!-- ======================== -->
	<!-- = 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 coordonnes) 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 (Systme altimtrique de rfrence)  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 prlvement 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 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 prlvement) 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 rsultat 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 (Accrditation d'un prlvement) 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 (Prlvement sous rserve) 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 (compltude d'envoi) par code = --><xsl:key name="keyNomenclature340" match="ref:REFERENTIELS/ref:REFERENTIELS/ref:Referentiel[ref:CdReferentiel=340]/ref:Element" use="ref:CdElement"/>

	<!-- ============================================ -->
	<!-- ============================================ -->
	<!-- ============================================ -->
	<!-- ============================================ --><xsl:template match="/hydrometrie" mode="transform"><fo:root><fo:layout-master-set><fo:simple-page-master master-name="portrait" page-width="21cm" page-height="29.7cm" margin-left="1.0cm" margin-top="1.5cm" margin-right="1.0cm" margin-bottom="1.5cm"><fo:region-body/></fo:simple-page-master><fo:simple-page-master master-name="paysage" page-width="29.7cm" page-height="21cm" margin-left="1.0cm" margin-top="1.5cm" margin-right="1.0cm" margin-bottom="1.5cm"><fo:region-body/></fo:simple-page-master></fo:layout-master-set><fo:page-sequence master-reference="portrait"><fo:flow flow-name="xsl-region-body">
					<!--<fo:block xsl:use-attribute-sets="Titre" width="18cm">
                        <xsl:value-of select="key('keyNomenclature295', Demande/TypeDemande)/ref:LbElement"/>
						date du : <xsl:value-of select="$dateD"/>
                    </fo:block>--><fo:table table-layout="fixed" width="18cm"><fo:table-column column-width="100mm"/><fo:table-body><fo:table-row><fo:table-cell><fo:block><fo:basic-link internal-destination="Caracteristiques"><fo:inline color="blue" text-decoration="underline">Caractéristiques du fichier d'échanges</fo:inline></fo:basic-link></fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:block><fo:basic-link internal-destination="ListeInter"><fo:inline color="blue" text-decoration="underline">Liste des intervenants</fo:inline></fo:basic-link></fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:block><fo:basic-link internal-destination="ListeSiteHydro"><fo:inline color="blue" text-decoration="underline">Liste des sites hydrométriques</fo:inline></fo:basic-link></fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:block><fo:basic-link internal-destination="ListeSiteMeteo"><fo:inline color="blue" text-decoration="underline">Liste des sites météorologiques</fo:inline></fo:basic-link></fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:block><fo:basic-link internal-destination="ListeModele"><fo:inline color="blue" text-decoration="underline">Liste des modèles de prévisions</fo:inline></fo:basic-link></fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:block><fo:basic-link internal-destination="Donnees"><fo:inline color="blue" text-decoration="underline">Données hydrométriques</fo:inline></fo:basic-link></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table><xsl:call-template name="carac"/><xsl:call-template name="listeinter"/><xsl:call-template name="listehydro"/><xsl:call-template name="listemeteo"/><xsl:call-template name="listemodele"/></fo:flow></fo:page-sequence><fo:page-sequence master-reference="paysage"><fo:flow flow-name="xsl-region-body"><xsl:call-template name="donnees"/></fo:flow></fo:page-sequence></fo:root></xsl:template>

	<!-- ========================== -->
	<!-- = DETAILS DE LA DEMANDE  = -->
	<!-- ========================== --><xsl:template name="carac"><fo:table xsl:use-attribute-sets="bord"><fo:table-column column-width="60mm"/><fo:table-column column-width="120mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre14" number-columns-spanned="2"><fo:block><fo:inline id="Caracteristiques">CARACTERISTIQUES DU FICHIER D'ECHANGE</fo:inline></fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell xsl:use-attribute-sets="Label14"><fo:block>Code du scénario :</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="Value14"><fo:block><xsl:value-of select="/hydrometrie/Scenario/CodeScenario"/></fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell xsl:use-attribute-sets="Label14"><fo:block>Version du scénario :</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="Value14"><fo:block><xsl:value-of select="/hydrometrie/Scenario/VersionScenario"/></fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell xsl:use-attribute-sets="Label14"><fo:block>Nom du scénario :</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="Value14"><fo:block><xsl:value-of select="/hydrometrie/Scenario/NomScenario"/></fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell xsl:use-attribute-sets="Label14"><fo:block>Date de création du fichier :</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="Value14"><fo:block><xsl:value-of select="/hydrometrie/Scenario/DateCreationFichier"/></fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell xsl:use-attribute-sets="Label14"><fo:block>Date de fin de référence :</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="Value14"><fo:block><xsl:value-of select="/hydrometrie/Scenario/DateFinReference"/></fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell xsl:use-attribute-sets="Label14"><fo:block>Emetteur du fichier :</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="Value14"><fo:block><xsl:value-of select="/hydrometrie/Scenario/Emetteur/CdIntervenant"/>(<xsl:value-of select="/hydrometriehydrometrie/Scenario/Emetteur/CdIntervenant/@schemeAgencyID"/>) (<xsl:value-of select="/hydrometrie/Scenario/Emetteur/NomIntervenant"/>)</fo:block></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell xsl:use-attribute-sets="Label14"><fo:block>Destinataire du fichier :</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="Value14"><fo:block><xsl:value-of select="/hydrometrie/Scenario/Destinataire/CdIntervenant"/>(<xsl:value-of select="/hydrometrie/Scenario/Destinataire/CdIntervenant/@schemeAgencyID"/>) (<xsl:value-of select="/hydrometrie/Scenario/Destinataire/NomIntervenant"/>)</fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></xsl:template>

	<!-- ========================== -->
	<!-- = donnees                = -->
	<!-- ========================== --><xsl:template name="donnees"><fo:table xsl:use-attribute-sets="bord"><fo:table-column column-width="60mm"/><fo:table-column column-width="200mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre14" number-columns-spanned="2"><fo:block><fo:inline id="Donnees">DONNEES HYDROMETRIQUES</fo:inline></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table><xsl:call-template name="evenement"/><xsl:call-template name="tarage"/><xsl:call-template name="jaugeage"/><xsl:call-template name="serie"/><xsl:call-template name="obsmeteo"/><xsl:call-template name="gradhydro"/></xsl:template>


	<!-- ========================== -->
	<!-- = donnees / serie        = -->
	<!-- ========================== --><xsl:template name="serie"><fo:table xsl:use-attribute-sets="allBord"><fo:table-column column-width="30mm"/><fo:table-column column-width="30mm"/><fo:table-column column-width="25mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="30mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="25mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre12" number-columns-spanned="8"><fo:block id="series">Séries de données</fo:block></fo:table-cell></fo:table-row><xsl:if test="count(/hydrometrie/Donnees/Series/Serie) &gt; 0"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Type</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Grandeur observée de la série</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Date de début de la série</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Date de fin de la série</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Statut de la série</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Date de production de la série</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Système de référence</fo:block></fo:table-cell></fo:table-row><xsl:for-each select="/hydrometrie/Donnees/Series/Serie"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdSiteHydro"/><xsl:value-of select="CdStationHydro"/><xsl:value-of select="CdCapteur"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:variable name="sta" select="CdStationHydro"/><xsl:variable name="hyd" select="CdSiteHydro"/><xsl:variable name="cap" select="CdCapteur"/><xsl:if test="$sta">Station hydrométrique</xsl:if><xsl:if test="$hyd">Site hydrométrique</xsl:if><xsl:if test="$cap">Capteur</xsl:if></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="GrdSerie"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="DtDebSerie"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="DtFinSerie"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="StatutSerie"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="DtProdSerie"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="SysAltiSerie"/></fo:block></fo:table-cell></fo:table-row></xsl:for-each></xsl:if></fo:table-body></fo:table></xsl:template>

	<!-- ========================== -->
	<!-- = donnees / evenement    = -->
	<!-- ========================== --><xsl:template name="evenement"><fo:table xsl:use-attribute-sets="allBord"><fo:table-column column-width="40mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="60mm"/><fo:table-column column-width="40mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre12" number-columns-spanned="6"><fo:block id="even">Liste d'évènements</fo:block></fo:table-cell></fo:table-row><xsl:if test="count(/hydrometrie/Donnees/Evenements/Evenement) &gt; 0"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Contact</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Type</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Date de l'évènement</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Description de l'évènement</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Type de publication</fo:block></fo:table-cell></fo:table-row><xsl:for-each select="/hydrometrie/Donnees/Evenements/Evenement"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdContact"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdStationHydro"/><xsl:value-of select="CdSiteHydro"/><xsl:value-of select="CdSiteMeteo"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:variable name="sta" select="CdStationHydro"/><xsl:variable name="hyd" select="CdSiteHydro"/><xsl:variable name="met" select="CdSiteMeteo"/><xsl:if test="$sta">Station hydrométrique</xsl:if><xsl:if test="$hyd">Site hydrométrique</xsl:if><xsl:if test="$met">Site météorologique</xsl:if></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="DtEvenement"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="DescEvenement"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="TypPublicationEvenement"/></fo:block></fo:table-cell></fo:table-row></xsl:for-each></xsl:if></fo:table-body></fo:table></xsl:template>


	<!-- ========================== -->
	<!-- = donnees / tarage       = -->
	<!-- ========================== --><xsl:template name="tarage"><fo:table xsl:use-attribute-sets="allBord"><fo:table-column column-width="65mm"/><fo:table-column column-width="65mm"/><fo:table-column column-width="65mm"/><fo:table-column column-width="65mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre12" number-columns-spanned="4"><fo:block id="tarage">Liste des courbes de tarages</fo:block></fo:table-cell></fo:table-row><xsl:if test="count(/hydrometrie/Donnees/CourbesTarage/CourbeTarage) &gt; 0"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code de courbe de tarage</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Libellé de courbe de tarage</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Type de courbe de tarage</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code de la station hydrométrique</fo:block></fo:table-cell></fo:table-row><xsl:for-each select="/hydrometrie/Donnees/CourbesTarage/CourbeTarage"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdCourbeTarage"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="LbCourbeTarage"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="TypCourbeTarage"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdStationHydro"/></fo:block></fo:table-cell></fo:table-row></xsl:for-each></xsl:if></fo:table-body></fo:table></xsl:template>

	<!-- ========================== -->
	<!-- = donnees / jaugeage     = -->
	<!-- ========================== --><xsl:template name="jaugeage"><fo:table xsl:use-attribute-sets="allBord"><fo:table-column column-width="130mm"/><fo:table-column column-width="130mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre12" number-columns-spanned="2"><fo:block id="jaugeage">Liste des jaugeages</fo:block></fo:table-cell></fo:table-row><xsl:if test="count(/hydrometrie/Donnees/Jaugeages/Jaugeage) &gt; 0"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code du jaugeage</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code du site hydrométrique</fo:block></fo:table-cell></fo:table-row><xsl:for-each select="/hydrometrie/Donnees/Jaugeages/Jaugeage"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdJaugeage"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdSiteHydro"/></fo:block></fo:table-cell></fo:table-row></xsl:for-each></xsl:if></fo:table-body></fo:table></xsl:template>

	<!-- ========================== -->
	<!-- = donnees / obsmeteo     = -->
	<!-- ========================== --><xsl:template name="obsmeteo"><fo:table xsl:use-attribute-sets="allBord"><fo:table-column column-width="50mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="50mm"/><fo:table-column column-width="40mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre12" number-columns-spanned="6"><fo:block id="obsmeteo">Liste des observations météorologiques</fo:block></fo:table-cell></fo:table-row><xsl:if test="count(/hydrometrie/Donnees/ObssMeteo/ObsMeteo) &gt; 0"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Date de production de l'observation</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code de la grandeur météorologique</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code du site météorologique</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Statut de l'observation météorologique</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Résultat de l'observation météorologique</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code du contact</fo:block></fo:table-cell></fo:table-row><xsl:for-each select="/hydrometrie/Donnees/ObssMeteo/ObsMeteo"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="DtProdObsMeteo"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdGrdMeteo"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdSiteMeteo"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="StatutObsMeteo"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="ResObsMeteo"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdContact"/></fo:block></fo:table-cell></fo:table-row></xsl:for-each></xsl:if></fo:table-body></fo:table></xsl:template>

	<!-- ========================== -->
	<!-- = donnees / gradhydro    = -->
	<!-- ========================== --><xsl:template name="gradhydro"><fo:table xsl:use-attribute-sets="allBord"><fo:table-column column-width="50mm"/><fo:table-column column-width="50mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="40mm"/><fo:table-column column-width="40mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre12" number-columns-spanned="6"><fo:block id="gradhydro">Liste des gradients hydrométriques</fo:block></fo:table-cell></fo:table-row><xsl:if test="count(/hydrometrie/Donnees/GradsHydro/GrdsGradHydro/GradHydro) &gt; 0"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Grandeur du gradient hydrométrique</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Date de production du gradient hydrométrique</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Durée du gradient hydrométrique</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Résultat du gradient hydrométrique</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Type</fo:block></fo:table-cell></fo:table-row><xsl:for-each select="/hydrometrie/Donnees/GradsHydro/GrdsGradHydro/GradHydro"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="../GrdGradHydro"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="DtProdGradHydro"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="DureeGradHydro"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="ResGradHydro"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdStationHydro"/><xsl:value-of select="CdCapteur"/><xsl:value-of select="CdSiteHydro"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:variable name="sta" select="CdStationHydro"/><xsl:variable name="hyd" select="CdSiteHydro"/><xsl:variable name="cap" select="CdCapteur"/><xsl:if test="$sta">Station hydrométrique</xsl:if><xsl:if test="$hyd">Site hydrométrique</xsl:if><xsl:if test="$cap">Capteur</xsl:if></fo:block></fo:table-cell></fo:table-row></xsl:for-each></xsl:if></fo:table-body></fo:table></xsl:template>

	<!-- ========================== -->
	<!-- = liste intervenants     = -->
	<!-- ========================== --><xsl:template name="listeinter"><fo:table xsl:use-attribute-sets="bord"><fo:table-column column-width="60mm"/><fo:table-column column-width="120mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre14" number-columns-spanned="2"><fo:block><fo:inline id="ListeInter">LISTE DES INTERVENANTS</fo:inline></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table><xsl:if test="count(/hydrometrie/RefHyd/Intervenants/Intervenant) &gt; 0"><fo:table xsl:use-attribute-sets="allBord"><fo:table-column column-width="90mm"/><fo:table-column column-width="90mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code de l'intervenant</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Nom de l'intervenant</fo:block></fo:table-cell></fo:table-row><xsl:for-each select="/hydrometrie/RefHyd/Intervenants/Intervenant"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdIntervenant"/>(<xsl:value-of select="CdIntervenant/@schemeAgencyID"/>)</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="NomIntervenant"/></fo:block></fo:table-cell></fo:table-row></xsl:for-each></fo:table-body></fo:table></xsl:if></xsl:template>

	<!-- ========================== -->
	<!-- = liste sites hydro      = -->
	<!-- ========================== --><xsl:template name="listehydro"><fo:table xsl:use-attribute-sets="bord"><fo:table-column column-width="60mm"/><fo:table-column column-width="120mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre14" number-columns-spanned="2"><fo:block><fo:inline id="ListeSiteHydro">LISTE DES SITES HYDROMETRIQUES</fo:inline></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table><xsl:if test="count(/hydrometrie/RefHyd/SitesHydro/SiteHydro) &gt; 0"><fo:table xsl:use-attribute-sets="allBord"><fo:table-column column-width="60mm"/><fo:table-column column-width="60mm"/><fo:table-column column-width="60mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code du site hydrométrique</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Libellé du site hydrométrique</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code de la zone hydrographique</fo:block></fo:table-cell></fo:table-row><xsl:for-each select="/hydrometrie/RefHyd/SitesHydro/SiteHydro"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdSiteHydro"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="LbSiteHydro"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdZoneHydro"/></fo:block></fo:table-cell></fo:table-row></xsl:for-each></fo:table-body></fo:table></xsl:if></xsl:template>

	<!-- ========================== -->
	<!-- = liste sites meteo      = -->
	<!-- ========================== --><xsl:template name="listemeteo"><fo:table xsl:use-attribute-sets="bord"><fo:table-column column-width="60mm"/><fo:table-column column-width="120mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre14" number-columns-spanned="2"><fo:block><fo:inline id="ListeSiteMeteo">LISTE DES SITES METEOROLOGIQUES</fo:inline></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table><xsl:if test="count(/hydrometrie/RefHyd/SitesMeteo/SiteMeteo) &gt; 0"><fo:table xsl:use-attribute-sets="allBord"><fo:table-column column-width="90mm"/><fo:table-column column-width="90mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code du site météorologique</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Libellé du site météorologique</fo:block></fo:table-cell></fo:table-row><xsl:for-each select="/hydrometrie/RefHyd/SitesMeteo/SiteMeteo"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdSiteMeteo"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="LbSiteMeteo"/></fo:block></fo:table-cell></fo:table-row></xsl:for-each></fo:table-body></fo:table></xsl:if></xsl:template>

	<!-- ========================== -->
	<!-- = liste modeles          = -->
	<!-- ========================== --><xsl:template name="listemodele"><fo:table xsl:use-attribute-sets="bord"><fo:table-column column-width="60mm"/><fo:table-column column-width="120mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="Titre14" number-columns-spanned="2"><fo:block><fo:inline id="ListeModele">LISTE DES MODELES DE PREVISIONS</fo:inline></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table><xsl:if test="count(/hydrometrie/RefHyd/ModelesPrevision/ModelePrevision) &gt; 0"><fo:table xsl:use-attribute-sets="allBord"><fo:table-column column-width="60mm"/><fo:table-column column-width="60mm"/><fo:table-column column-width="60mm"/><fo:table-body><fo:table-row><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Code du modèle de prévision</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Libellé du modèle de prévision</fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cellH"><fo:block>Type du modèle de prévision</fo:block></fo:table-cell></fo:table-row><xsl:for-each select="/hydrometrie/RefHyd/ModelesPrevision/ModelePrevision"><fo:table-row><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="CdModelePrevision"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="LbModelePrevision"/></fo:block></fo:table-cell><fo:table-cell xsl:use-attribute-sets="cell Value10"><fo:block><xsl:value-of select="TypModelePrevision"/></fo:block></fo:table-cell></fo:table-row></xsl:for-each></fo:table-body></fo: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="hydrometrie_v1.xml" htmlbaseurl="" outputurl="" processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml=""
		          commandline="" additionalpath="" additionalclasspath="" postprocessortype="fop" 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="bSchemaAware" value="true"/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="bGenerateByteCode" value="true"/>
			<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="bUseDTD" value="false"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="xsltVersion" value="2.0"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
	</scenarios>
	<MapperMetaTag>
		<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
		<MapperBlockPosition></MapperBlockPosition>
		<TemplateContext></TemplateContext>
		<MapperFilter side="source"></MapperFilter>
	</MapperMetaTag>
</metaInformation>
-->