5c1a1fd05925c22db75cf1fab567e2b0d0041390
[pompage.git] / xsl / yopyop.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">\r
3  <xsl:template match="filmographie">
4   <html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
5    <head>
6     <title>yopYop</title>\r
7     <link rel="stylesheet" href="../css/yopyop.css" type="text/css" />\r
8     <script type="text/javascript" src="../js/yopyop.js" ></script>
9    </head>
10    <body>
11     <h1>DivX</h1>
12     <table id="liste">
13      <tr>
14       <th class="titre">Titre</th>
15       <th class="annee">Année</th>\r
16       <th class="duree">Durée</th>\r
17       <th class="lien">Lien</th>\r
18       <th class="fichier">Fichier</th>
19      </tr>\r
20      
21      <xsl:for-each select="film">
22       <xsl:sort select="annee" order="descending" />\r
23       <xsl:sort select="titre" />
24       <tr>
25        <td onclick="detailFilm('{@id}')" class="titre"><xsl:value-of select="titre"/></td>
26        <td class="annee"><xsl:value-of select="annee"/></td>\r
27        <td class="duree"><xsl:value-of select="duree"/> min</td>\r
28        <td class="lien"><a href="{url}">GO</a></td>\r
29        <td class="fichier"><a href="divx:///{fichier}">GO</a></td>
30       </tr>\r
31       <tr>\r
32        <td colspan="5" class="detail">\r
33         <table class="detail" id="{@id}">\r
34          <tr><td class="titreDetail">Genre<xsl:if test="count(genres/genre) > 1">s</xsl:if></td><td><xsl:for-each select="genres/genre"><xsl:value-of select="."/><xsl:if test="not(position() = last())">, </xsl:if></xsl:for-each></td></tr>\r
35          <tr><td class="titreDetail">Réalisateur<xsl:if test="count(realisateurs/realisateur) > 1">s</xsl:if></td><td><xsl:for-each select="realisateurs/realisateur"><xsl:value-of select="."/><xsl:if test="not(position() = last())">, </xsl:if></xsl:for-each></td></tr>\r
36          <tr><td class="titreDetail">Acteur<xsl:if test="count(acteurs/acteur) > 1">s</xsl:if></td><td><xsl:for-each select="acteurs/acteur"><xsl:value-of select="."/><xsl:if test="not(position() = last())">, </xsl:if></xsl:for-each></td></tr>\r
37          <tr><td class="titreDetail">Pays</td><td><xsl:for-each select="lespays/pays"><xsl:value-of select="."/><xsl:if test="not(position() = last())">, </xsl:if></xsl:for-each></td></tr>\r
38          <tr><td class="titreDetail">Synopsis</td><td><xsl:value-of select="synopsis"/></td></tr>\r
39         </table>\r
40        </td>\r
41       </tr>
42      </xsl:for-each>
43     </table>
44    </body>
45   </html>
46  </xsl:template>
47 </xsl:stylesheet>