Re: New nameSpace
Tiscar Sebastien <[email protected]>
| Newsgroups | gmane.text.xml.french.tech |
|---|---|
| Message-ID | <004301c64439$d20f4ac0$a7021cac@ODIN11> |
le namespace est il déclaré dans la feuille xslt? ----- Original Message ----- From: "Thibaud Elzière" <[email protected]> To: <[email protected]> Sent: Friday, March 10, 2006 10:53 AM Subject: [xml-tech] New nameSpace Bonjour, Je travaille à partir de fichier RSS dans lequel je rajoute un namespace :example, bizarrement le namespace est bien déclaré est reconnu dans le XML et la feuille XSLT mais XSLT ne lit pas les éléments : XML simplifié -------------- <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="http://localhost/styles/style.xsl" type="text/xsl" media="screen"?> <rss xmlns:example="http://localhost/~rss" version="2.0"> <channel> <example:availableLanguages> <example:language domain="http://localhost/index.php?q=&l=en" code="en">EN</example:language> <example:language domain="http://localhost/index.php?q=&l=fr" code="fr">FR</example:language> <example:language domain="http://localhost/index.php?q=&l=de" code="de">DE</example:language> <example:language domain="http://localhost/index.php?q=&l=es" code="es">ES</example:language> </example:availableLanguages> </channel> </rss> Partie du XSLT --------------- <xsl:template match="example:availableLanguages/example:language"> <a href="{./@domain}"> <xsl:value-of select="."/> </a> </xsl:template> Est-ce que j'utilise bien le bon formalisme ? Merci Thibaud -- Devenez redacteur <XML>fr et contribuez au developpement du xml francophone (http://xmlfr.org/infos/redacteurs/) ! Liste de diffusion "[email protected]" (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 [email protected] (mailto:[email protected]?Subject=unsubscribe)