Bonjour,
Voici mon code pour afficher le débit de parole avec le nombre de mots/min mais je voudrais le remplacer par le nombre de syllabes prononcées divisé par la durée du tour de parole par minute soit :
<xsl:variable name="nbsyllab" select="sum(tour/motBDL[@nbsyll != '']/@nbsyll)" />
<xsl:variable name="debitsyll" select="($nbsyllab* 60) div ($duree)" />
J'ai tout essayé rien ne marche .. help me !!
Merci beaucoup, bonne soirée tout le monde
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlnssl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" />
<xsl:template match="/">
<html>
<head>
<title>Compteur de mots</title>
<link rel="stylesheet" media="screen" type="text/css" href="tableau.css" />
</head>
<body>
<p class="nosnoms"> **************</p>
<p class="titretableaudebit"> **************** </p>
<table>
<tr>
<th>Fichier</th>
<th>Mots</th>
<th>Durée en sec</th>
<th>Debit mots/min</th>
</tr>
<xsl:for-each select="Trans/Episode/Section">
<xsl:variable name="motspartopic" select="sum(./Turn/tour/@nbmots)" />
<xsl:variable name="tempsfin" select="sum(./Turn/@endTime)"/>
<xsl:variable name="tempsdébut" select="sum(./Turn/@startTime)"/>
<xsl:variable name="tempspartopic" select="$tempsfin - $tempsdébut"/>
<xsl:variable name="calcul" select="($motspartopic * 60) div ($tempspartopic)" />
<tr>
<td> **************</td>
<td> <xsl:value-of select="$motspartopic" /> </td>
<td> <xsl:value-of select="format-number($tempspartopic, '0.0')"/></td>
<td> <xsl:value-of select="format-number($calcul, '0')"/></td>
</tr>
</xsl:for-each>
</table>
<br/>
<p class="titre2">Tours de parole</p>
<xsl:for-each select="Trans/Episode/Section">
<table>
<caption class="toursdeparole">
</caption>
<tr>
<th>Texte</th>
<th>Temps de parole (/s) </th>
<th>Nombre de mots</th>
<th>Débit (mots/min)</th>
</tr>
<xsl:for-each select="Turn">
<xsl:variable name="nbmot" select="count(.//motBDL)" />
<xsl:variable name="dureeTurn" select="@endTime - @startTime" />
<tr>
<td> <xsl:value-of select="." /> </td>
<td> <xsl:value-of select="format-number(@endTime - @startTime,'0.0')" /></td>
<td> <xsl:value-of select="$nbmot"/> </td>
<td> <xsl:value-of select="format-number($nbmot*60 div $dureeTurn, '0.0')"/> </td>
</tr>
</xsl:for-each>
</table>
<br/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Partager