1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
| <?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="ISO-8859-1" />
<xsl:template match="/">
<html>
<head>
<title> <xsl:value-of select="@matiere"/> </title>
</head>
<body bgcolor="skyblue">
<center>
<table border="9" cellsspacing="3" cellpadding="6" width="700" bgcolor="skyblue">
<td><img src="imgXml/logo.jpg"/></td>
<td> <center> <h1> <font color="darkblue"> Questionnaire pour neuneus </font> </h1> </center> </td>
<td><img src="imgXml/logo.jpg"/></td>
</table>
</center>
<form action="...">
<xsl:apply-templates/>
<br/> <br/> <center> <input type="submit" value="Résultats du test" /> </center>
</form>
</body>
</html>
</xsl:template>
<xsl:template match="question">
<br/>
<center>
<table border="1" cellsspacing="3" cellpadding="6" width="500" bgcolor="skyblue">
<tr>
<td>
<center>
<h3><font color="darkblue"><xsl:value-of select="libellé"/></font></h3>
</center>
</td>
</tr>
</table>
<table border="1" cellsspacing="3" cellpadding="6" width="500" bgcolor="skyblue">
<tr>
<td>
<img>
<xsl:attribute name="src">
<xsl:value-of select="imgsrc"/>
</xsl:attribute>
</img>
</td>
<td>
<xsl:apply-templates/>
</td>
</tr>
</table>
<br/>
</center>
</xsl:template>
<xsl:template match="choix">
<br/>
<input type="radio">
<xsl:attribute name="name">
<xsl:value-of select="concat('Q',count(preceding::question)+1)"/>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="count(preceding::choix)+1"/>
</xsl:attribute>
</input>
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet> |
Partager