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
| <?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="Windows-1252"/>
<xsl:template match="/*">
<html>
<style type="text/css">
.FERME {background-color:#BBBBCC; font-family: Verdana; font-size: 8pt; cursor:pointer;}
.OUVERT { background-color:#EEF3FB; font-style:blod;font-family: Verdana; font-size: 8pt; cursor:pointer;}
.DERNIER { font-style:blod;font-family: Verdana; font-size: 8pt;}
.VALEURNOEUD { background-color:#FFFFCC; font-family: Verdana; font-size: 8pt;}
.ATTRIBUT {color:#999999;}
</style>
<script language="javascript">
function affiche_cache(objet){
ObjetCible=objet.parentNode.nextSibling;
if (ObjetCible.style.display=="none"){
ObjetCible.style.display="block";
objet.className="OUVERT";
}
else{
ObjetCible.style.display="none";
objet.className="FERME";
}
}
</script>
<body>
<table width="100%" align="center" border="1">
<tr>
<td width="100%" align="center" class="OUVERT" onclick="javascript:affiche_cache(this);">
<xsl:attribute name="colspan"><xsl:value-of select="count(child::*)"/></xsl:attribute>
<b><xsl:value-of select="name()"/></b>
(<span class="ATTRIBUT"><xsl:for-each select="@*"><b><xsl:value-of select="name()"/></b> : <i><xsl:value-of select="."/></i> </xsl:for-each></span>)
</td>
</tr>
<tr>
<xsl:apply-templates select="*"/>
</tr>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="*">
<td valign="top" bgcolor="white">
<xsl:choose>
<xsl:when test="*">
<table width="100%" align="center" border="1">
<tr>
<td width="100%" align="center" class="FERME" onclick="javascript:affiche_cache(this);">
<xsl:attribute name="colspan"><xsl:value-of select="count(child::*)"/></xsl:attribute>
<b> <xsl:value-of select="name()"/></b>
(<span class="ATTRIBUT"><xsl:for-each select="@*"><b><xsl:value-of select="name()"/></b> : <i><xsl:value-of select="."/></i> </xsl:for-each></span>)
</td>
</tr>
<tr style="display:none">
<xsl:apply-templates select="*"/>
</tr>
</table>
</xsl:when>
<xsl:otherwise>
<div class="DERNIER">
<b><xsl:value-of select="name()"/></b>
(<span class="ATTRIBUT"><xsl:for-each select="@*"><b><xsl:value-of select="name()"/></b> : <i><xsl:value-of select="."/></i> </xsl:for-each></span>)
</div>
<div class="VALEURNOEUD"><xsl:value-of select="."/></div>
</xsl:otherwise>
</xsl:choose>
</td>
</xsl:template>
</xsl:stylesheet> |
Partager