tp-xml-films/cinema.xsl

140 lines
4.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink">
<xsl:template match="/">
<html>
<head>
<title>Cinéma Efrei</title>
<link rel="stylesheet" type="text/css" href="cinema-xsl.css"/>
</head>
<body>
<h1>Cinéma Efrei</h1>
<xsl:for-each select="cinéma/film">
<div class="film">
<div class="présentation">
<div class="titre">
<h3><xsl:value-of select="titre"/></h3>
<p>(<span class="année"><xsl:value-of select="année"/></span>), <span class="réalisateur"><xsl:value-of select="réalisateur"/></span></p>
</div>
<div class="genres">
<xsl:for-each select="genres/genre">
<p><xsl:value-of select="."/></p>
</xsl:for-each>
</div>
<p class="langue"><xsl:value-of select="langue"/></p>
<p class="durée"><xsl:value-of select="durée"/> minutes</p>
<div class="nationalités">
<xsl:for-each select="nationalités/nationalité">
<p><xsl:value-of select="."/></p>
</xsl:for-each>
</div>
<div>
<p>Avec :</p>
<ul class="acteurs">
<xsl:for-each select="acteurs/acteur">
<li>
<a href="{@xlink:href}">
<xsl:value-of select="."/>
</a>
</li>
</xsl:for-each>
</ul>
</div>
<ul class="notes">
<xsl:for-each select="notes/note[@source='presse']">
<li>Note de la presse : <xsl:value-of select="."/>/5</li>
</xsl:for-each>
<xsl:for-each select="notes/note[@source='spectateur']">
<li>Note des spectateurs : <xsl:value-of select="."/>/5</li>
</xsl:for-each>
</ul>
</div>
<div class="synopsis">
<p><xsl:value-of select="synopsis"/></p>
</div>
<p>Séances :</p>
<div class="séances">
<div>
<p>Lundi :</p>
<ul>
<xsl:for-each select="séances/séance[@jour='lundi']">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</div>
<div>
<p>Mardi :</p>
<ul>
<xsl:for-each select="séances/séance[@jour='lundi']">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</div>
<div>
<p>Mercredi :</p>
<ul>
<xsl:for-each select="séances/séance[@jour='lundi']">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</div>
<div>
<p>Jeudi :</p>
<ul>
<xsl:for-each select="séances/séance[@jour='lundi']">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</div>
<div>
<p>Vendredi :</p>
<ul>
<xsl:for-each select="séances/séance[@jour='lundi']">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</div>
<div>
<p>Samedi :</p>
<ul>
<xsl:for-each select="séances/séance[@jour='lundi']">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</div>
<div>
<p>Dimanche :</p>
<ul>
<xsl:for-each select="séances/séance[@jour='lundi']">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</div>
</div>
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<!-- vim: tabstop=2 softtabstop=2 shiftwidth=2
-->