01:00:00 ---> 1 ora OK

02:40:00 ---> 2 ore 40 minuti OK

00:30:46 ---> 0 ora 30 minuti 46 secondi WRONG 0 ora -- I want to display only minutes and seconds (if there are only these)

NEW CODE
Code: Select all
<xsl:if test="length/@hours!=''">
<!-- <xsl:if test="length/@hours='0'"> -->
<tr>
<td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/video/length/@name"/></td>
<td class="record_pane_table_fieldvalue">
<xsl:value-of select="length/@hours"/>
<xsl:choose>
<xsl:when test="length/@hours > 1"><!-- se la lunghezza delle ore ha valore 1 (uno) allora sostituisce ore con ora -->
ore
</xsl:when>
<xsl:otherwise>
ora
</xsl:otherwise>
</xsl:choose>
<xsl:if test="length/@minutes > 0"> <!-- se la lunghezza dei secondi ha valore 0 (zero) allora non visualizzare -->
<xsl:value-of select="length/@minutes"/><xsl:text> minuti </xsl:text>
</xsl:if>
<xsl:if test="length/@seconds > 0"> <!-- se la lunghezza dei secondi ha valore 0 (zero) allora non visualizzare -->
<xsl:value-of select="length/@seconds"/><xsl:text> secondi </xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="length='0:00'">
inserire la durata
<a href="http://akas.imdb.com/find?q={title}">IMDB</a>
</xsl:when>
</xsl:choose>
</td>
</tr>
</xsl:if>