Re: Recherche en XPATH et casse.

Eric van der Vlist <[email protected]>
Newsgroups gmane.text.xml.french.tech
Organization Dyomedea (http://dyomedea.com)
Message-ID <[email protected]>
Bonjour,
Le samedi 04 mars 2006 à 00:16 +0100, [email protected] a écrit :
> Bonsoir,
> 
> J'ai realisé un systeme qui permet de faire des recherches dans mes divers
> fichiers XML.
> 
> Je me suis servis principalement de contains()
> 
> Cependant je souhaiterais gérer les majuscules et minuscules :
> 
> Puige faire mes comparaison de la sorte
> 
> <xsl:when
> test="contains(id/@auteur,translate($recherche_text,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ"))
> OR
> contains(id/@auteur,translate($recherche_text,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz"))">
> 
> J'obtiens des erreurs :(
> 
> Une idée ?

Vous ne pouvez pas utiliser les mêmes "quotes" (" ou ') pour délimiter
une valeur d'attribut et à l'intérieur de cette valeur...

Remplacez les " dans le translate par des ' et cela devrait aller mieux!

Cordialement,

Eric van der Vlist

-- 
GPG-PGP: 2A528005
Don't you think all these XML schema languages should work together?
                                                         http://dsdl.org
------------------------------------------------------------------------
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
------------------------------------------------------------------------


-- Attached file included as plaintext by Ecartis --

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBECVnqDvn+ZCpSgAURAqjQAJ0YJCwh2TCEC+CrYie4Mwf1+tXpOwCfaT93
Nb66d3EbeTQjcktM0IAqTPc=
=JTj+
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.