Merci beaucoup c'était ça ! maintenant ca marche :-)
Merci encore
Céline
> De: Frédéric Laurent <fl@opikanoba.org>
> A: xml-tech@xmlfr.org
> Objet: [xml-tech] Re: xmlns et les XSL
> Date: Thu, 28 Apr 2005 16:22:43 +0200
> elon céline cél <celine.cel@caramail.com>:
> > Bonjour
>
> bonjour
>
> > j'ai un probleme avec les xmlns, prenons l'exemple
> >
> > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > <livre xmlns="<a href=http://www.monserveur.fr/XML/livre>http://www.monserveur.fr/XML/livre</a>>
> > <chapitre numero="1">
> >
> > <head><titre>Introduction</titre></head>
> >
> > <h1>Introduction</h1>
> > <p>Le livre commence par ce texte...</p>
> >
> >
> > </chapitre>
> > </livre>
> >
> > je fais la feuille de style suivante :
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsl:stylesheet xmlns:xsl="<a href=http://www.w3.org/1999/XSL/Transform>http://www.w3.org/1999/XSL/Transform</a>
> > version="1.0">
> > <xsl:template match="/livre" >
> >
> >
> >
> > <!-- Start Main Content Box -->
> > <xsl:apply-templates
> > select="./chapitre"></xsl:apply-templates>
> >
> >
> > </xsl:template>
> >
> >
> > <xsl:template match="chapitre">
> > <table border="1" cellspacing="0" cellpadding="0" width="100%">
> > & nbsp; <tr><td>
> > <h1><xsl:value-of select="."/></h1>
> > </td></tr></table>
> > </xsl:template>
> > </xsl:stylesheet>
> >
> > Celle-ci ne fonctionne que si je retire
> > 'xmlns="<a href=http://[1]www.monserveur.fr/XML/livre[2]>http://[1]www.monserveur.fr/XML/livre[2]</a>' de la balise livre.
> >
> > Je suppose qu'il faut préciser l'espace de nommage dans la XSL mais je ne
> > vois pas où et comment?
> >
> >
> >
> > est-ce que quelqu'un a une idée ?
>
> oui ;)
>
> de la même façon que vous déclarez l'espace de noms de xsl,
> il faut déclarer celui de livre
>
> <xsl:stylesheet
> xmlns:xsl="<a href=http://www.w3.org/1999/XSL/Transform>http://www.w3.org/1999/XSL/Transform</a>
> xmlns:livre="<a href=http://www.monserveur.fr/XML/livre>http://www.monserveur.fr/XML/livre</a>
> version="1.0">
>
>
> ensuite les requêtes XPath utilisant des éléments de l'espace
> de noms livre doivent être préfixées
>
> <xsl:template match="livre:chapitre">
> ...
> </xsl:template>
>
> cordialement
>
> --
> XPath free testing software : <a href=http://lantern.sourceforge.net>http://lantern.sourceforge.net</a>Frédéric Laurent <a href=http://www.opikanoba.org>http://www.opikanoba.org</a>
> --
> Devenez redacteur <xml>fr et contribuez au developpement du
> xml francophone (<a href=http://xmlfr.org/infos/redacteurs/>http://xmlfr.org/infos/redacteurs/</a> !
>
> Liste de diffusion "xml-tech@xmlfr.org" (<a href=http://xmlfr.org>http://xmlfr.org</a>.
>
> 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)
Protek-on: CaraMail met en oeuvre un nouveau Concept de Sécurité Globale - www.caramail.com
--
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 Apr 29 09:05:07 2005