<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">



<xsl:import href="DDC_Trad.xsl"/>


<xsl:output method="html"
	indent="yes"
	omit-xml-declaration="yes"
	encoding="UTF-8"
	media-type="print"
	doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
	doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>

      
<xsl:template match="/">
<html>

<head>
<title>
<xsl:apply-templates select="EmailDiagDocument" mode="titre"/>
</title>
<LINK rel="stylesheet" type="text/css" href="../config/demande_histo.css" />
<LINK rel="stylesheet" type="text/css" href="../config/font-police.css" />
</head>

	<!-- Recuperation du parametre de langue a utiliser -->	
	<xsl:variable name="LangueVar" select="EmailDiagDocument/Body/InfoPDV/Langue"/>
	<!-- Recuperation du parametre de police a utiliser en fonction de la langue -->	
<xsl:variable name="Police">Police_<xsl:value-of select="$LangueVar"/></xsl:variable>
<body id="{$Police}" >


<div class="da">
<xsl:apply-templates select="EmailDiagDocument"/>

<!--
<H1>DEBUG &lt;Ensemble des donnees presentes dans le fichier xml stylise&gt; </H1>
<xsl:value-of select="."/>
<br/>
Langue=(<xsl:value-of select="$LangueVar"/>)
Police=(<xsl:value-of select="$Police"/>)
<H1>END DEBUG</H1>
-->

</div>
</body>

</html>
</xsl:template>


<xsl:template match="EmailDiagDocument">
<xsl:variable name="LangueVar" select="Body/InfoPDV/Langue"/> 

	<!-- Recuperation du profil a utiliser - distinction vis a vis des profils 1, 4 et 7 (assimile AP) des profils 2, 3 et 6 (assimile AC) -->	
	<xsl:variable name="Profil" select="Body/Profil"/>
	<xsl:variable name="IsAPDisplay"> 
		<xsl:choose>
			<xsl:when test="$Profil='P1' or $Profil='P4' or $Profil='P7'">
				1
			</xsl:when>
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="$Profil='P2' or $Profil='P3' or $Profil='P6' or $Profil='PR' or $Profil='P8'">
					0
					</xsl:when>
					<xsl:otherwise>
					1
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<!-- DEBUG -->
<!--	Profil=(<xsl:value-of select="$Profil"/>)
[<xsl:choose>
	<xsl:when test="$IsAPDisplay=1">
		Profil interface AP
	</xsl:when>
	<xsl:otherwise>
		Profil interface AC
	</xsl:otherwise>
</xsl:choose>]
-->	<!-- END DEBUG -->

	<!-- premiere partie - demande assistance a panne -->
<div>
	<xsl:call-template name="infosGen">
		<xsl:with-param name="infoPDVLangue" select="$LangueVar"/>
		<xsl:with-param name="IsAPDisplay" select="$IsAPDisplay"/>
	</xsl:call-template> 
</div>

	<!-- deuxieme partie - specifique mode demande assistance / complement d'info -->
<div>
	<xsl:call-template name="corps">
		<xsl:with-param name="infoPDVLangue" select="$LangueVar"/>
		<xsl:with-param name="IsAPDisplay" select="$IsAPDisplay"/>
	</xsl:call-template>	
</div>
	
	<!-- troisieme partie - resultat et notes -->
<div>
	<xsl:call-template name="notes">
		<xsl:with-param name="infoPDVLangue" select="$LangueVar"/>
	</xsl:call-template>	
</div>

</xsl:template>


<!-- cree la premiere partie de la page
	reference vers le type DA/CI et les informations generales
-->
<xsl:template name="infosGen">
<xsl:param name="infoPDVLangue"/>
<xsl:param name="IsAPDisplay"/>


<table id="titre">
	<!-- titre du document DA ou CI -->
	<tr>
		<td id="imgLion">
			<img src="../pictures/image_gauche.jpg"/>
		</td>
		<td id="titre">
			<xsl:call-template name="afficheType">
				<xsl:with-param name="infoPDVLangue" select="$infoPDVLangue"/>
			</xsl:call-template>
		</td>
		<td id="imgDroite">
			<img src="../pictures/image_droite.jpg"/>
		</td>
	</tr>
</table>

<table id="tableNature">
	 <!-- premier regroupement concernant la nature du DA/CI -->
	 <tr>
		<!-- predefini Vehicule, Outils de diagnostic, Documentation et méthode de réparation -->
		<xsl:variable name="natureDA" select="Body/Nature"/>
		<td id="tdNature">
			<!-- vehicule -->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0206</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>			
		</td>
		<td id="texteUtilisateur">
			<xsl:choose>
				<xsl:when test="$natureDA = 'VEHICULE_NATURE'">
				X
				</xsl:when>
				<xsl:otherwise>
				&#160;&#160;
				</xsl:otherwise>
			</xsl:choose>
		</td>
	<xsl:choose>
	<xsl:when test="$IsAPDisplay=1">
		<td id="tdNature">
			<!-- outils de diag -->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0207</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>
		</td>
		<td id="texteUtilisateur">
			<xsl:choose>
				<xsl:when test="$natureDA = 'OUTIL_DIAG_NATURE'">
				X
				</xsl:when>
				<xsl:otherwise>
				&#160;&#160;
				</xsl:otherwise>
			</xsl:choose>
		</td>
		<td id="tdNature">
			<!--Documentation et methode de reparation-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0208</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>
		</td>
		<td id="texteUtilisateur">
			<xsl:choose>
				<xsl:when test="$natureDA = 'DOCUMENTATION_NATURE'">
				X
				</xsl:when>
				<xsl:otherwise>
				&#160;&#160;
				</xsl:otherwise>
			</xsl:choose>
		</td>
	</xsl:when>
	<xsl:otherwise>
		<td></td>
		<td></td>
	</xsl:otherwise>
	</xsl:choose>

	</tr>
</table>
	<!-- Separation nature/demande validation technique - Afficher uniquement pour les DA -->

<table id="tableTechVal">
	<tr>
	<xsl:if test="Body/Type = 'DA_MODE'">
		<!-- validation technique --> 
		<td id="tdNature">
			<!--validation technique-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0209</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>
		</td>
		<td id="texteUtilisateur">
			<xsl:choose>
				<xsl:when test="Body/TechnicalValidation = '5'">
				X
				</xsl:when>
				<xsl:otherwise>
				&#160;&#160;
				</xsl:otherwise>
			</xsl:choose>
		</td>
		<td></td>
		<td></td>
	</xsl:if>
	</tr>
</table>


<table id="tableDate">
	<!-- regroupement date, point de service, email, 
				numero de dossier, etablie par, telephone -->	
	<tr>
		<td>
			<!--Date-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0300</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>
		</td>
		<td id="texteUtilisateur">
			<xsl:variable name="date" select="Body/LastModificationDate"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$date"/>
			</xsl:call-template>
		</td>
		<td>
		<!--Point de service-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0321</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>
		</td>
		<td id="texteUtilisateur">
			<xsl:variable name="raisonSocial" select="Body/InfoPDV/RaisonSociale"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$raisonSocial"/>
			</xsl:call-template>
		</td>
		<td>
			<!-- Email -->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0162</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>
		</td>
		<td colspan="2" id="texteUtilisateur">
			<xsl:variable name="email">
			 <xsl:choose>
				<xsl:when test="Body/Interlocutor/Email = ''">	
					<xsl:value-of select="Body/InfoPDV/Email"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="Body/Interlocutor/Email"/>
				</xsl:otherwise>
			  </xsl:choose>
			</xsl:variable>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$email"/>
			</xsl:call-template>		
		</td>
	</tr>
	<!-- Separation date/numDossier -->
	<tr>
		<td>
			<!--Numero Dossier-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0163</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>	
		</td>
		<td  id="texteUtilisateur">	
			<xsl:variable name="numDossier" select="Body/TicketNumber"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$numDossier"/>
			</xsl:call-template>
		</td>	
		<td>
			<!--Etablie par-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0322</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>
		</td>
		<td id="texteUtilisateur">

			<xsl:variable name="name">
			 <xsl:choose>
				<xsl:when test="Body/Interlocutor/Name = ''">	
					<xsl:value-of select="Body/InfoPDV/Interlocuteur"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="Body/Interlocutor/Name"/>
				</xsl:otherwise>
			  </xsl:choose>
			</xsl:variable>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$name"/>
			</xsl:call-template>	
		</td>
		<td>
			<!--Telephone-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0161</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>		
		</td>
		<td colspan="2" id="texteUtilisateur">
		<xsl:variable name="telephone">
			 <xsl:choose>
				<xsl:when test="Body/Interlocutor/Phone = ''">	
					<xsl:value-of select="Body/InfoPDV/TelephoneCT"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="Body/Interlocutor/Phone"/>
				</xsl:otherwise>
			  </xsl:choose>
			</xsl:variable>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$telephone"/>
			</xsl:call-template>

		</td>
	</tr>
<!-- Separation numDossier/Type vehicule -->

	<!-- regroupement type de vehicule, num VIN, num DAM 
				Kilometre, debut de garantie, num commmande -->	
	<tr>
		<td>
			<!--Type de vehicule-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0137</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>
		</td>
		<td id="texteUtilisateur">
			<xsl:variable name="typeVehicule" select="Body/Vehicule/Type"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$typeVehicule"/>
			</xsl:call-template>
		</td>
		<td>
			<!--N° VIN-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0138</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>		
		</td>
		<td id="texteUtilisateur">
			<xsl:variable name="vinVehicule" select="Body/Vehicule/VIN"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$vinVehicule"/>
			</xsl:call-template>
		</td>
		<td>
			<!--N° DAM-->
			<xsl:variable name="idTradDAMOPR">
				<xsl:choose>
					<xsl:when test="$IsAPDisplay=1">id0139</xsl:when>
					<xsl:otherwise>id0339</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad" select="$idTradDAMOPR"/>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>
		</td>
		<td colspan="2" id="texteUtilisateur">
			<xsl:variable name="damVehicule" select="Body/Vehicule/DAM"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$damVehicule"/>
			</xsl:call-template>
		</td>
	</tr>
<!-- Separation typeVehicule/Kms -->
	<tr>
		<td>
			<!--Kilometrage-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0140</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>		
		</td>
		<td id="texteUtilisateur">
			<xsl:variable name="kmsVehicule" select="Body/Vehicule/KMS"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$kmsVehicule"/>
			</xsl:call-template>
		</td>
		<td>
			<!--Date de debut de garantie-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0141</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>		
		</td>
		<td id="texteUtilisateur">
			<xsl:variable name="garantieVehicule" select="Body/Vehicule/WarrantyDate"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$garantieVehicule"/>
			</xsl:call-template>
		</td>
		<td>
			<!--N° de commande de travaux-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0142</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>		
		</td>
		<td colspan="2" id="texteUtilisateur">
			<xsl:variable name="numCommandeVehicule" select="Body/Vehicule/NumDT"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$numCommandeVehicule"/>
			</xsl:call-template>
		</td>
	</tr>
<!-- Separation kms/vehicule immobilise -->
	<tr>
	<xsl:variable name="paralyseVehicule" select="Body/Failure/Paralyse"/>
	<!-- regroupement vehicule immobilise, Securite, Panne -->	
		<td>
				<!--Vehicule immobilise-->
				<xsl:call-template name="afficheTrad">
					<xsl:with-param name="DA_idTrad">id0144</xsl:with-param>
					<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
				</xsl:call-template>
			</td>
			<td>
				<table id="tablePanne">
				<tr>
					<td>
						<!-- OUI -->
						<xsl:call-template name="afficheTrad">
							<xsl:with-param name="DA_idTrad">id0164</xsl:with-param>
							<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
						</xsl:call-template>
					</td>
					<td>
						<!-- NON -->
						<xsl:call-template name="afficheTrad">
							<xsl:with-param name="DA_idTrad">id0165</xsl:with-param>
							<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
						</xsl:call-template>
					</td>
				</tr>
				<tr>
					<td id="texteUtilisateur">
						<xsl:choose>
							<xsl:when test="$paralyseVehicule = '1'">
							X
							</xsl:when>
							<xsl:otherwise>
							&#160;
							</xsl:otherwise>
						</xsl:choose>
					</td>
					<td id="texteUtilisateur">
						<xsl:choose>
							<xsl:when test="$paralyseVehicule = '0'">
							X
							</xsl:when>
							<xsl:otherwise>
							&#160;
							</xsl:otherwise>
						</xsl:choose>
					</td>
				</tr>
				</table>
		</td>
		<td>
				<!--Securite-->
				<xsl:call-template name="afficheTrad">
					<xsl:with-param name="DA_idTrad">id0147</xsl:with-param>
					<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
				</xsl:call-template>
			</td>
			<td>
				<table id="tablePanne">
				<tr>
					<td>
						<!-- OUI -->
						<xsl:call-template name="afficheTrad">
							<xsl:with-param name="DA_idTrad">id0164</xsl:with-param>
							<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
						</xsl:call-template>
					</td>
					<td>
						<!-- NON -->
						<xsl:call-template name="afficheTrad">
							<xsl:with-param name="DA_idTrad">id0165</xsl:with-param>
							<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
						</xsl:call-template>
					</td>
				</tr>
				<tr>
					<xsl:variable name="securityVehicule" select="Body/Failure/Security"/>
					<td id="texteUtilisateur">
						<xsl:choose>
							<xsl:when test="$securityVehicule = '1'">
							X
							</xsl:when>
							<xsl:otherwise>
							&#160;
							</xsl:otherwise>
						</xsl:choose>
					</td>
					<td id="texteUtilisateur">
						<xsl:choose>
							<xsl:when test="$securityVehicule = '0'">
							X
							</xsl:when>
							<xsl:otherwise>
							&#160;
							</xsl:otherwise>
						</xsl:choose>
					</td>
				</tr>
				</table>
		</td>
		<td>
			<!--Panne-->
				<xsl:call-template name="afficheTrad">
					<xsl:with-param name="DA_idTrad">id0143</xsl:with-param>
					<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
				</xsl:call-template>
			</td>
			<td>
				<table id="tablePanne">
				<tr>
					<td>
						<!-- OUI -->
						<xsl:call-template name="afficheTrad">
							<xsl:with-param name="DA_idTrad">id0164</xsl:with-param>
							<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
						</xsl:call-template>
					</td>
					<td>
						<!-- NON -->
						<xsl:call-template name="afficheTrad">
							<xsl:with-param name="DA_idTrad">id0165</xsl:with-param>
							<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
						</xsl:call-template>
					</td>
				</tr>
				<tr>
					<td id="texteUtilisateur">
						<xsl:choose>
							<xsl:when test="$paralyseVehicule = '1'">
							X
							</xsl:when>
							<xsl:otherwise>
							&#160;
							</xsl:otherwise>
						</xsl:choose>
					</td>
					<td id="texteUtilisateur">
						<xsl:choose>
							<xsl:when test="$paralyseVehicule = '0'">
							X
							</xsl:when>
							<xsl:otherwise>
							&#160;
							</xsl:otherwise>
						</xsl:choose>
					</td>
				</tr>
				</table>
		</td>
	</tr>
</table>
</xsl:template>


<!-- cree la partie specifique DA/CI
	DA : Effet client, diagnostic, remede
	CI : Operation demandee par la palte-forme, reponse du pont de service
-->
<xsl:template name="corps">
<xsl:param name="infoPDVLangue"/>
<xsl:param name="IsAPDisplay"/>

<xsl:choose>
	<xsl:when test="Body/Type = 'DA_MODE'">
	<!-- DA -->
<table id="tableDA">
	<tr>
		<td id="texteInformation">
			<!--Effet client-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0150</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>		
		</td>
		<td id="texteUtilisateur">
			<xsl:variable name="effetClient" select="Body/Failure/ClientEffect"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$effetClient"/>
			</xsl:call-template>
		</td>
	</tr>
</table>
<table id="tableDA">
	<tr>
		<td id="texteInformation">
		<table>
		<tr>
			<td>
				<!--Mesures / Tests-->
				<xsl:call-template name="afficheTrad">
					<xsl:with-param name="DA_idTrad">id0151</xsl:with-param>
					<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
				</xsl:call-template>			
			</td>
		</tr>
		<tr>
			<td>
			   <xsl:if test="$IsAPDisplay = 1">
				<!--Informations complementaires-->
				<xsl:call-template name="afficheTrad">
					<xsl:with-param name="DA_idTrad">id0152</xsl:with-param>
					<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
				</xsl:call-template>
			   </xsl:if>
			</td>
		</tr>
		</table>
		</td>
		<td id="texteUtilisateur">
			<xsl:variable name="mesureTestsInfos" select="Body/Failure/Diagnostic"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$mesureTestsInfos"/>
			</xsl:call-template>
		</td>
	</tr>
</table>
<table id="tableDA">
	<tr>
		<td id="texteInformation">
			<!--Remede / Interventions-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0153</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>		
		</td>
		<td id="texteUtilisateur">
			<xsl:variable name="remedeInterventions" select="Body/Repair/RepairIntervention"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$remedeInterventions"/>
			</xsl:call-template>
		</td>
	</tr>
</table>

	<!-- ICI LA SEPARATION DA/CI --> 
	</xsl:when>	
	<xsl:otherwise>
<table id="tableDA">
	<tr>
		<td id="texteInformation">
			<!--Operation demandee par la plate-forme-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0216</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>		
		</td>
		<td id="texteUtilisateur">
			<xsl:variable name="operationDemandee" select="Body/Repair/RepairOperation"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$operationDemandee"/>
			</xsl:call-template>
		</td>
	</tr>
</table>
<table id="tableDA">
	<tr>
		<td id="texteInformation">
			<!--Reponse du point de service-->
			<xsl:variable name="idTradResPDS">
				<xsl:choose>
					<xsl:when test="$IsAPDisplay=1">id0217</xsl:when>
					<xsl:otherwise>id0349</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad" select="$idTradResPDS"/>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>		
		</td>
		<td id="texteUtilisateur">
			<xsl:variable name="reponsePointService" select="Body/Repair/RepairResponse"/>
			<xsl:call-template name="afficheValeur">
				<xsl:with-param name="val" select="$reponsePointService"/>
			</xsl:call-template>
		</td>
	</tr>
</table>	
	</xsl:otherwise>
</xsl:choose>
<!-- FIN de la partie specifique --> 
<!-- partie concernant le resultat obtenu -->
<table id="tableResultat">
<tr>
		<td>
			<!--Resultat obtenu-->
			<xsl:call-template name="afficheTrad">
				<xsl:with-param name="DA_idTrad">id0154</xsl:with-param>
				<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
			</xsl:call-template>		
		</td>
		<td>
			<table>
			<tr>
				<td>
					<!--Negatif-->
					<xsl:call-template name="afficheTrad">
						<xsl:with-param name="DA_idTrad">id0157</xsl:with-param>
						<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
					</xsl:call-template>				
				</td>
				<td>
					<!--Palliatif-->	
					<xsl:call-template name="afficheTrad">
						<xsl:with-param name="DA_idTrad">id0158</xsl:with-param>
						<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
					</xsl:call-template>	
				</td>
				<td>
					<!--Positif-->
					<xsl:call-template name="afficheTrad">
						<xsl:with-param name="DA_idTrad">id0155</xsl:with-param>
						<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
					</xsl:call-template>	
				</td>
			</tr>

			<tr>
				<xsl:variable name="resultatObtenu" select="Body/Repair/RepairResult"/>
				<td id="texteUtilisateur">
					<xsl:choose>
						<xsl:when test="$resultatObtenu = '3'">
						X
						</xsl:when>
						<xsl:otherwise>
						&#160;
						</xsl:otherwise>
					</xsl:choose>
				</td>
				<td id="texteUtilisateur">
					<xsl:choose>
						<xsl:when test="$resultatObtenu = '2'">
						X
						</xsl:when>
						<xsl:otherwise>
						&#160;
						</xsl:otherwise>
					</xsl:choose>
				</td>
				<td id="texteUtilisateur">
					<xsl:choose>
						<xsl:when test="$resultatObtenu = '1'">
						X
						</xsl:when>
						<xsl:otherwise>
						&#160;
						</xsl:otherwise>
					</xsl:choose>
				</td>
			</tr>
			</table>
		</td>
</tr>      
</table>
</xsl:template>



<!-- cree la derniere partie
Notes : avec un espace libre
Modification 25/05/07 : pas de traduction pour note
-->
<xsl:template name="notes">
<xsl:param name="infoPDVLangue"/>
	<div class="spacerNote" id="texteUtilisateur"/> 	
</xsl:template>

<xsl:template name="afficheValeur">
<xsl:param name="val">''</xsl:param>
	<xsl:choose>
		<xsl:when test="$val != ''">
			<xsl:value-of select="$val"/>
		</xsl:when>
		<xsl:otherwise>
			&#160;
		</xsl:otherwise>
	</xsl:choose>
</xsl:template>

<xsl:template name="afficheType">
<xsl:param name="infoPDVLangue"/>
<xsl:choose>
	<xsl:when test="Body/Type = 'DA_MODE'">
	<xsl:call-template name="afficheTrad">
		<xsl:with-param name="DA_idTrad">id0320</xsl:with-param>
		<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
	</xsl:call-template>
	</xsl:when>
	<xsl:otherwise>
	<xsl:call-template name="afficheTrad">
		<xsl:with-param name="DA_idTrad">id0309</xsl:with-param>
		<xsl:with-param name="DA_langue" select="$infoPDVLangue"/>
	</xsl:call-template>
	</xsl:otherwise>
</xsl:choose>
</xsl:template>


<xsl:template match="EmailDiagDocument" mode="titre">
<xsl:variable name="LangueVar" select="Body/InfoPDV/Langue"/>
<xsl:call-template name="afficheType">
	<xsl:with-param name="infoPDVLangue" select="$LangueVar"/>
</xsl:call-template>
</xsl:template>

</xsl:stylesheet>
