🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.text.xml
Article #9514

Re: XPath dans tous les sens ;-(

#9514
From: Rapha�l THERY
Date: Tue, 27 Mar 2001 14:46
51 lines
2606 bytes
    merci !

Pierre Attar <pattar@tireme.fr> a �crit dans le message :
3ac08d59.2031611@news.dial.oleane.com...
> "Rapha�l THERY" <raphael.thery@free.fr> wrote:
>
> >Bonjour, j'ai un petit soucis dans l''utilisation de XPath; Je n'arrive
pas
> >� s�lectionner les f�res du noeud courant.
> >
> >Exemple :
> >soit
> ><Elements>
> >    <Groupe>
> >        <fils xml:lang="fr">saValeur</fils>
> >        <fils xml:lang="en">saValeur</fils>
> >        <fils xml:lang="en">saValeur</fils>
> >        <fils xml:lang="de">saValeur</fils>
> >    </Groupe>
> ></Elements>
> >
> >Pour localiser celui en Fran�ais je fais :
> ><xsl:template match="Groupe">
> >....
> ><xsl:when test="Elements/Groupe/fils[lang('fr')] = text()">
> >...
> c'est plut�t :  <xsl:apply-templates select="fils[lang('fr')]">
> ></xsl:template>
> >
> >Par contre ensuite depuis ce noeud je veux remonter sur le p�re pour
> >connaitre l'ensemble de ses fils ... anglais par exemple !
> >Mais j'ai beau triturer les axes dans tous les sens je n'arrive pas �
�crire
> >l'expression.
> >
> <xsl:template match="fils[lang('fr')]">
> Valeur en fran�ais : <xsl:appply-templates />
> Valeur en anglais : <xsl:apply-templates
> select="./parent::*/fils[lang('en')]"/>
>
> </xsl:template>
>
>
> -------------------------------
> Pierre Attar (mailto:pattar@tireme.fr)
>
> TIREME SARL (http://www.tireme.fr)
>
> Projet "Mutualiser l'effort de mont�e en comp�tences sur XML"
> http://fing.org/projet-xml/index.html
>
Technical Details
Message-ID: <tJ1w6.207$2n5.1139737@nnrp3.proxad.net>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!proxad.net!feeder2.proxad.net!nnrp3.proxad.net.POSTED!not-for-mail
References: <TBXv6.69$Iz2.442407@nnrp3.proxad.net> <3ac08d59.2031611@news.dial.oleane.com>

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: 114f60,664a9a54c3d5dfca
X-Google-Attributes: gid114f60,public
X-Google-ArrivalTime: 2001-03-27 06:53:51 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!proxad.net!feeder2.proxad.net!nnrp3.proxad.net.POSTED!not-for-mail
From: "Rapha�l THERY" <raphael.thery@free.fr>
Newsgroups: fr.comp.text.xml
References: <TBXv6.69$Iz2.442407@nnrp3.proxad.net> <3ac08d59.2031611@news.dial.oleane.com>
Subject: Re: XPath dans tous les sens ;-(
Lines: 53
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <tJ1w6.207$2n5.1139737@nnrp3.proxad.net>
Date: Tue, 27 Mar 2001 14:46:49 GMT
NNTP-Posting-Host: 195.115.154.77
X-Complaints-To: abuse@proxad.net
X-Trace: nnrp3.proxad.net 985704409 195.115.154.77 (Tue, 27 Mar 2001 16:46:49 CEST)
NNTP-Posting-Date: Tue, 27 Mar 2001 16:46:49 CEST
Organization: Guest of ProXad - France