[XSL]Soucis de lecture de balise svg
Bonjour a tous.
J'essaye d'inserer ungraphique Svg dans ma page Xml. Ceci se passe bien tant qu'il n'y a pas de feuille de style.
Si j'adjoint mon XSL à mon document xml, alors la il ne voit plus mon SVG. J'ai essayer de decaler mes balise de template XSL mais rien n'y fait.
Je pense que cela viens de mon faible niveau en XSL... pourriez vous m'aider ?
Xml :
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| <?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="MontignyRungisCR.xsl"?>
<MtpReport>
<parent xmlns="http://example.org"
xmlns:svg="http://www.w3.org/2000/svg">
<!-- le contenu du parent ici -->
<svg:svg viewBox="0 0 2000 1300" width="20cm" height="20cm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg:title>Les jours de la semaine</svg:title>
<svg:defs>
<svg:path id="trait" d="M0,0 l800,0 z" />
<svg:rect id="pastille" x="0" y="0" width="60" height="60" stroke="black" stroke-width="4" />
</svg:defs>
<svg:g transform="translate(50,50)">
<!-- Mis en place des axes-->
<svg:g stroke-width="2" stroke="black" id="part">
<svg:line x1="0" y1="0" x2="0" y2="800" />
<svg:line x1="0" y1="800" x2="1000" y2="800" />
</svg:g>
<!-- Ajout de la courbes -->
<svg:g stroke-width="2" stroke="red" id="part_Sunday">
<line x1="50" y1="100" x2="80" y2="150" />
<line x1="80" y1="150" x2="110" y2="160" />
<line x1="110" y1="160" x2="140" y2="195" />
</svg:g>
</svg:g>
</svg:svg>
</parent>
<Gare>
<Label>MONTIGNY BEAUCHAMP</Label>
<arrivee>00:00</arrivee>
<depart>00:00</depart>
</Gare>
<Gare>
<Label>FRANCONVILLE </Label>
<arrivee>00:00</arrivee>
<depart>00:00</depart>
</Gare>
<Gare>
<Label>CERNAY</Label>
<arrivee>00:00</arrivee>
<depart>00:00</depart>
</Gare>
</MtpReport> |
XSL(sans la feuille de style) :
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 28 29 30 31 32 33
|
<?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>
<head>
<style type="text/css">
</style>
</head>
<title>
Scoring Report
</title>
<body>
<H1 align="center">MISSION</H1>
<H3 align="left"> Test SVG dans un fichier XSL</H3>
<P/>
<TABLE class="parameters">
<COL class="ParametersCol1"/><COL class="ParametersCol2"/><COL class="ParametersCol2"/>
<TR><TH>Gare</TH><TH>heure depart</TH><TH>heure d'arrivee</TH></TR>
<xsl:for-each select="MtpReport/Gare">
<TR><TD><xsl:value-of select="Label" /></TD>
<TD><xsl:value-of select="arrivee" /></TD>
<TD><xsl:value-of select="depart" /></TD></TR>
</xsl:for-each>
</TABLE>
</body>
</html>
</xsl:template>
</xsl:stylesheet> |