Re: Filtrage de doublons

Eric van der Vlist <[email protected]>
Newsgroups gmane.text.xml.french.tech
Organization Dyomedea (http://dyomedea.com)
Message-ID <[email protected]>
Le mardi 07 février 2006 à 12:23 +0100, [email protected] a écrit :
> Par contre impossible de virer les doublons dans mon fichiers
> 
> <liste>
> <auteur>Auteur 1</auteur>
> <auteur>Auteur 2</auteur>
> <auteur>Auteur 3</auteur>
> ...
> </liste>
> 
> <?xml version="1.0" ?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> 
> <xsl:template match="liste">
> 	<xsl:apply-templates select="auteur[not(preceding::/liste/auteur = auteur
> )]" />
Cette expression XPath n'est pas correcte. Essayez :

<xsl:apply-templates select="auteur[not(preceding-sibling::auteur = .)]" />

Cordialement,

Eric van der Vlist

PS (sans vouloir être désagréable) : ce que vous faites est suffisamment
compliqué pour que vous ayez besoin de bases solides en XPath et XSLT et
vous devriez investir un peu de temps à étudier tout cela :-) ...

-- 
GPG-PGP: 2A528005
Did you know it? Python has now a Relax NG (partial) implementation.
                                          http://advogato.org/proj/xvif/
------------------------------------------------------------------------
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)

iD8DBQBD6IiPDvn+ZCpSgAURAi/XAJwNLn3EONub+OpFOakBuJW1MLZSUACfVCHX
6hsntDevsWTHipw2OcPQ+10=
=4xT9
-----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.