Bonjour,
J'utilise xsltproc pour transformer un fichier XML en SVG via XSLT. Mon probleme est que j'arrive pas à acceder aux balise prefixé de mon document xml par la fonction Select.
Pour plus de detail voici mon XML
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfAnyType
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.ircad.org/webservices/service1">
<anyType xsi:type="NewDevice">
<ID>3002</ID>
<ListPort>
<anyType xsi:type="Port">
<ID>300300201</ID>
<No>1</No>
<Vitesse>100</Vitesse>
<Equipement>3002</Equipement>
<MAC>00-50-ba-2e-22-7a</MAC>
</anyType>
</ListPort>
<ListConnexion>
<anyType xsi:type="Connexion">
<Pere>6006</Pere>
<Fils>300300201</Fils>
<Structurel>0</Structurel>
<Agregat>0</Agregat>
<Doublette>0</Doublette>
</anyType>
</ListConnexion>
<PriseM>0</PriseM>
<Nom>Internet-1</Nom>
<Portswitch>0</Portswitch>
</anyType>
<anyType xsi:type="NewDevice">
<ID>3002</ID>
<ListPort>
<anyType xsi:type="Port">
<ID>300300201</ID>
<No>1</No>
<Vitesse>100</Vitesse>
<Equipement>3002</Equipement>
<MAC>00-50-ba-2e-22-7a</MAC>
</anyType>
</ListPort>
<ListConnexion>
<anyType xsi:type="Connexion">
<Pere>6006</Pere>
<Fils>300300201</Fils>
<Structurel>0</Structurel>
<Agregat>0</Agregat>
<Doublette>0</Doublette>
</anyType>
</ListConnexion>
<PriseM>0</PriseM>
<Nom>Internet-1</Nom>
<Portswitch>0</Portswitch>-->
</anyType>
<!-- <anyType>
</anyType> -->
</ArrayOfAnyType>
et Mon Fichier XSLT
<?xml version="1.0" ?>
<xsl:stylesheet
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
extension-element-prefixes="xsi" version="1.0">
<!--
<xslutput method="xml" indent="yes"
doctype-public="-//W3C//DTD SVG 1.0//EN"
doctype-system="http://www.w3.org/TR/2001/REC-SVG-
20010904/DTD/svg10.dtd"/>
-->
<xsl:template match="/">
<xsl:copy-of select="/xsl:stylesheet/@version"/>
<svg width="50%" height="50%" viewBox="0 0 1500 1000">
<g>
<!--<xsl:apply-templates/>-->
<xsl:call-template name="maFunction"/>
</g>
</svg>
</xsl:template>
<xsl:template name="maFunction">
<text>My Network</text>
<xsl:variable name="iterator" select="20"/>
<xsl:for-each select="ArrayOfAnyType/anyType"> // The
problem is here - i can't access thoses tags
<xsl:variable name="value" select="$iterator * 2"/>
<text style="font-size:60; font-family:'Comic Sans
MS';fill:teal; text-anchor:middle;" x="750" y="100">My
Network</text>
<rect x="{$value+100}" y="{$value+100}" width="200"
height="200" fill="#CCccCC"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Je vous remerci d'avance
Cordialement
---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici !
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Received on Fri Jul 22 11:20:57 2005