From: Eric van der Vlist (vdv@dyomedea.com)
Date: 20/01/2004 - 19:43
Bonjour,
On Tue, 2004-01-20 at 18:54, Guillaume wrote:
> Bonjours,
>
> j'ai un xml :
> <?xml version="1.0" encoding="UTF-8" ?>
> <Cours>
> <Unite categorie="Conférence">
> <Intervenant s="3">titi</Intervenant>
> </Unite>
> </Cours>
>
> et un xlst :
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>
> <xsl:template match="Cours">
> <xsl:element name = "ProfsPauvres">
> <xsl:apply-templates
> select="Unite/Intervenant[@salaire < 20]"/>
> </xsl:element>
> </xsl:template>
>
>
> </xsl:stylesheet>
>
>
> Quand j'applique l'un sur l'autre j'ai le message
> suivant :
> ERROR: The character '<' cannot be used in an
> attribute value.
>
> Source: ' <xsl:apply-templates
> select="Unite/Intervenant[@salaire < 20]"/>'
> Line: 6, Pos: 65
>
> C'est bizard car si je met un > c'est OK.
>
> Je suis perdu car dans la doc > ou < c'est identique.
Non! Faites confiance à votre parseur :-) ...
Le "<" est interdit dans un document XML alors que le ">" est toléré.
Il faut donc écrire
<xsl:apply-templates
select="Unite/Intervenant[@salaire < 20]"/>
Cordialement,
Eric van der Vlist
--
Weblog:
http://eric.van-der-vlist.com/blog?t=category&a=English
Upcoming XML schema languages tutorial:
- Santa Clara -half day- (15/03/2004) http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
(ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
--
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)
Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:06 UTC
webmaster@xmlfr.org
|