[Débutant] [XSLT] CSS et XSL dans le même document
Bonsoir,
quand j'écris ce bout de code, ça fonctionne bien (au point de vue CSS) :
Code:
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
| Document XSL
<?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="/">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<title>Bienvenue sur le site de Sidahmed</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
body
{
width: 760px;
margin-top: 20px;
margin-bottom: 20px;
font-size: 0.8em;
font-family: Verdana, "Times New Roman", serif;
color: black;
}
...
</style>
<body>
...
</body>
</html>
</xsl:template>
</xsl:stylesheet> |
Mais ce code là, ça marche pas :
Code:
1 2 3 4 5
| <?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<?xml-stylesheet type="text/css" href="style/design.css" ?>
...
</xsl:stylesheet> |
Design.css :
Code:
1 2 3 4 5 6 7 8 9 10
| body
{
width: 760px;
margin-top: 20px;
margin-bottom: 20px;
font-size: 0.8em;
font-family: Verdana, "Times New Roman", serif;
color: black;
}
... |
Merci de m'aider.