Voici la maniere de faire un lien dans un fichier *.XML avec l'aide du fichier *.XSL
Fichier style.XSL
| Code |
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="yo">
<HTML>
<HEAD>
<TITLE><xsl:value-of select="@title"/></title>
</head>
<BODY BGCOLOR="#FFFFFF">
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="item" >
<ul>
<li>
<a type="simple">
<xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
<xsl:value-of select="description"/>
</a>
</li>
</ul>
</xsl:template>
</xsl:stylesheet>
|
Et le fichier *.XML
| Code |
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet href="style.XSL" type="text/xsl"?>
<yo title="yo">
<item>
<link>http://dayd.graphiks.net/</link>
<description>DAYD un super site</description>
</item>
</yo>
|
| |