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
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<head>
<style type="text/css">
.style_body {font-family:Verdana, Arial, Helvetica, sans serif; font-size:10pt}
.style_conteneur {position:absolute; width:750px; height:auto; background:#B98CCC; left:50%}
.style_haut {height:75px; font-size:30px; color:#FFCC99; font-weight:bold}
.style_gauche {position:absolute; left:0; width:150px; padding-test:1px}
.style_droite {margin-left:150px; padding-top:10px; padding-left:10px; padding-right:10px}
</style>
</head>
<body class="style_body">
<xsl:apply-templates select="racine/conteneur"/>
</body>
</html>
</xsl:template>
<xsl:template match="conteneur">
<div class="style_conteneur">
<xsl:apply-templates select="haut"/>
<xsl:apply-templates select="gauche"/>
<xsl:apply-templates select="droite"/>
<xsl:apply-templates select="bas"/>
</div>
</xsl:template>
<xsl:template match="haut">
<div class="style_haut">
<xsl:value-of select="."/>
</div>
</xsl:template>
<xsl:template match="gauche">
<div class="style_gauche">
<xsl:apply-templates select="menu"/>
</div>
</xsl:template>
<xsl:template match="menu">
<ul style="list-style-type:none; font-size:11px; margin:0; padding:0">
<xsl:for-each select="*">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</xsl:template>
<xsl:template match="droite">
<div class="style_droite">
<xsl:value-of select="."/>
</div>
</xsl:template>
<xsl:template match="bas">
<div style="height:30px; background:#456BBB; font-size:12px">
<xsl:apply-templates select="bas_droite"/>
<xsl:apply-templates select="bas_gauche"/>
</div>
</xsl:template>
<xsl:template match="bas_droite">
<div style="float:right; text-align:right">
<xsl:value-of select="."/>
</div>
</xsl:template>
<xsl:template match="bas_gauche">
<xsl:for-each select="item">
<div><xsl:value-of select="."/></div>
</xsl:for-each>
</xsl:template>
<xsl:template match="//item">
<span style="font-family:times"><xsl:value-of select="."/></span>
</xsl:template>
</xsl:stylesheet> |