<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<html>
<link rel="stylesheet" type="text/css" href="file:///C:\Documents and Settings\buloup\Mes documents\PROJETS\DOCOMETRE2\Aide\Resume\Docometre.css"/>
			<body>				
				<div id="TITRE">
				<h2>Résumé du protocole expérimental</h2></div>
		 		<div id="PARAMGENE">
					<h3>Paramètres généraux</h3>
					<h4><u>Nom :</u></h4>
					<p>
						<xsl:value-of select="ROOT/EXPERIENCE/@NOM">
						</xsl:value-of>
					</p>
					<h4><u>Descriptif :</u></h4>
					<p>
						<xsl:for-each select="ROOT/EXPERIENCE/DESCRIPTIF">
							<xsl:value-of select="@TEXT">
							</xsl:value-of><br/>
						</xsl:for-each>					
					</p>
					
					<h4><u>Feg :</u><xsl:value-of select="concat('  ',ROOT/EXPERIENCE/@FEG,' Hz')">
					</xsl:value-of></h4>
		 		</div>
		 		
		 		
		 		<div id="CONFIGHARD">
					<h3>Configuration hardware</h3>
					<xsl:if test="(count(/ROOT/EAN) + count(/ROOT/ENUM)) &gt; 0">
						<div id="ENTREES">
							<h3>Entrées</h3>
							  	<xsl:if test="count(/ROOT/EAN) &gt; 0">
									<div id="EAN">
										<h3 id="EAN">Analogiques</h3>
										<h4><u>Amplitude :</u><xsl:value-of select="concat('  ',ROOT/CTRLEAN/@AMPLITUDE)">
											</xsl:value-of></h4>

										<h4><u>SE ou Diff. :</u><xsl:value-of select="concat('  ',ROOT/CTRLEAN/@SEDIFF)">
											</xsl:value-of></h4>

										<table cellspacing="0" width="100%">

											<tr><th>Nom</th><th>Fe</th>
												<th>Gain</th>
												<th>Numéro</th>
											</tr>
											<xsl:for-each select="ROOT/EAN">
												<tr>
													<td><xsl:value-of select="@NOM"></xsl:value-of></td>
													<td><xsl:value-of select="concat(@FE,' Hz')"></xsl:value-of></td>
													<td>
														<xsl:value-of
															select="@GAIN">
														</xsl:value-of>
													</td>
													<td>
														<xsl:value-of
															select="@NUMERO">
														</xsl:value-of>
													</td>
												</tr>
											</xsl:for-each>
										</table>

									</div>
								</xsl:if>
								<xsl:if test="count(/ROOT/ENUM) &gt; 0"><div id="ENUM">
									<h3 id="ENUM">Numériques</h3>
									<h4><u>Fe :</u><xsl:value-of select="concat('  ',ROOT/CTRLESNUM/@FE,' Hz')"></xsl:value-of></h4>
									<table cellspacing="0" width="100%">
										<tr>
											<th>Nom</th>
											<th>Numéro</th>
										</tr>
										<xsl:for-each select="ROOT/ENUM">
											<tr>
												<td>
													<xsl:value-of
														select="@NOM">
													</xsl:value-of>
												</td>
												<td>
													<xsl:value-of
														select="@NUMERO">
													</xsl:value-of>
												</td>
											</tr>
										</xsl:for-each>
									</table>
							</div></xsl:if>
					
					</div></xsl:if>
					<xsl:if test="(count(/ROOT/SAN) + count(/ROOT/SNUM)) &gt; 0"><div id="SORTIES">
						<h3>Sorties</h3>
						<xsl:if test="count(/ROOT/SAN) &gt; 0"><div id="SAN">
							<h3 id="SAN">Analogiques</h3>
							<h4>
								<u>Amplitude :</u>
								<xsl:value-of select="concat('  ',ROOT/CTRLSAN/@AMPLITUDE)"></xsl:value-of>
							</h4>
							<table cellspacing="0" width="100%">
								<tr>
									<th>Nom</th>
									<th>Fe</th>
									<th>Numéro</th>
								</tr>
								<xsl:for-each select="ROOT/SAN">
									<tr>
										<td>
											<xsl:value-of select="@NOM"></xsl:value-of>
										</td>
										<td>
											<xsl:value-of select="@FE"></xsl:value-of>
										</td>
										<td>
											<xsl:value-of select="@NUMERO"></xsl:value-of>
										</td>
									</tr>
								</xsl:for-each>
							</table>
</div></xsl:if>
						<xsl:if test="count(/ROOT/SNUM) &gt; 0"><div id="SNUM">
							<h3 id="SNUM">Numériques</h3>
							<h4>
								<u>Fe :</u>
								<xsl:value-of select="concat('  ',ROOT/CTRLESNUM/@FE,' Hz')"></xsl:value-of>
							</h4>
							<table cellspacing="0" width="100%">
								<tr>
									<th>Nom</th>
									<th>Numéro</th>
								</tr>
								<xsl:for-each select="ROOT/SNUM">
									<tr>
										<td>
											<xsl:value-of select="@NOM"></xsl:value-of>
										</td>
										<td>
											<xsl:value-of select="@NUMERO"></xsl:value-of>
										</td>
									</tr>
								</xsl:for-each>
							</table>
</div></xsl:if>
						
						</div></xsl:if>
					<xsl:if test="count(/ROOT/PSERIE) &gt; 0">
						<div id="PSERIES">
							<h3>Ports série</h3>
							<table cellspacing="0" width="100%">
								<tr>
									<th>Nom</th>
									<th>Type</th>
									<th>Port</th>
								</tr>
								<xsl:for-each select="ROOT/PSERIE">
									<tr>
										<td>
											<xsl:value-of select="@NOM"></xsl:value-of>
										</td>
										<td>
											<xsl:value-of select="@SYSTEME"></xsl:value-of>
										</td>
										<td>
											<xsl:value-of select="concat('COM',@NUMERO)"></xsl:value-of>
										</td>
									</tr>
								</xsl:for-each>
							</table>
						</div>
					</xsl:if>
					<xsl:if test="count(ROOT/CANINT) &gt; 0"><div id="CANINT">
						<h3>Canaux internes</h3>
						<table cellspacing="0" width="100%">
							<tr>
								<th>Nom</th>
								<th>Type</th>
								<th>Fréq. / Num par.</th>
								<th>Taille</th>
								<th>Format</th>
							</tr>
							<xsl:for-each select="ROOT/CANINT">
								<tr>
									<td>
										<xsl:value-of select="@NOM"></xsl:value-of>
									</td>
									<td>
										<xsl:value-of select="@GENRE"></xsl:value-of>
									</td>
									<td>
										<xsl:value-of select="@FENUMPAR"></xsl:value-of>
									</td>
									<td>
										<xsl:value-of select="@TAILLE"></xsl:value-of>
									</td>
									<td>
										<xsl:value-of select="@FORMAT"></xsl:value-of>
									</td>
								</tr></xsl:for-each></table>
</div></xsl:if>



		 		</div>
					 
		 		
			<xsl:if test="count(ROOT/SUJET) &gt; 0">
		 			<div id="ORGANISATION">
		 				<h3>Organisation</h3>
		 						 			<xsl:for-each select="ROOT/SUJET">
		 						<div id="SUJET">
		 							<h3 id="SUJET">
		 								<xsl:value-of select="@NOM"></xsl:value-of>
		 							</h3>
		 						<table cellspacing="0" width="100%">


		 							<tr>
		 								<th>Session</th>
		 								<th>Num essai</th>
		 								<th>Nom ST</th>
		 								<th>Etat</th>
		 							</tr>
		 							<xsl:for-each select="SESSION">
		 								<xsl:for-each select="ESSAI">
		 									<tr>
		 										<td>

		 											<xsl:value-of select="../@NOM">
		 											</xsl:value-of>
		 										</td>
		 										<td>

		 											<xsl:number value="position()" format="1">
		 											</xsl:number>
		 										</td>
		 										<td>
		 											<xsl:value-of select="@NOMST">
		 											</xsl:value-of>
		 										</td>
		 										<td>
		 											<xsl:value-of select="@ETAT">
		 											</xsl:value-of>
		 										</td>
		 									</tr>
		 								</xsl:for-each>
		 							</xsl:for-each>
		 						</table></div>

		 						
		 					</xsl:for-each></div>
		 		</xsl:if></body>	
		</html>
	</xsl:template>
</xsl:stylesheet>
