🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: XPath et la difficult� de son �criture.

#9233
From: Rapha�l THERY
Date: Wed, 02 May 2001 08:32
46 lines
2881 bytes
Si j'ai bien compris
j'utilise dans un premier temps un axe descandant : child qui me permet de
pointer le noeud de travail
et ensuite, au sein de la m�me expression, je change d'orientation pour
pointer le pr�c�dant ou le suivant.
Donc selon toute logique on ne peut trouver d'axes diff�rents dans un
"pr�dicat de recherche".

>
$Fichier/fils[@nature=1][@nom=current()/@nom]/preceding-sibling::fils[1]/@Na
me
>                                             ^^^

Concernant les lignes ci dessus pourquoi les "^^^" ?

Je pense avoir acquis la th�orie ... reste la pratique
Je vais donc essayer merci
Rapha�l

Tom. <ptittom+news@free.fr> a �crit dans le message :
1135038.FpCBEx9A2H@ltgt.net...
> In <HobG6.253$Lw4.656473@nnrp4.proxad.net>, Rapha�l THERY wrote:
> > l'expression suivante me permet d'acceder au noeud dont le nom
correspond
> > � mon flux
> > <xsl:value-of select="$Fichier/fils[@nature='1'][@nom =
> > current()/@nom]/@Name" />
> >
> > par contre je souhaite acc�der au noeud pr�c�dent et suivant.... donc (�
> > mon avis un truc) du genre :
> > <xsl:value-of select="$Fichier/fils[@nature='1'][@nom =
> > current()/@nom][preceding-sibling::fils[position()=1]]/@Name" />
> > (comme vu dans la spec XPATH) mais cela ne marche pas !
>
>
$Fichier/fils[@nature=1][@nom=current()/@nom]/preceding-sibling::fils[1]/@Na
me
>                                             ^^^
> Il faut une �tape de localisation pour "se d�placer", un pr�dicat ne fait
> que restreindre une recherche (dans l'expression que tu avais donn�, �...
> qui a un �l�ment fils le pr�c�dant�, mais tu s�lectionne toujours
l'�l�ment
> $Fichier/fils[@nature=1][@nom=current()/@nom], sauf s'il n'a pas de "fils"
> le pr�c�dant)
>
> Tom.
Technical Details
Message-ID: <iCPH6.1867$vt6.23868538@nnrp6.proxad.net>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!proxad.net!feeder2-1.proxad.net!nnrp6.proxad.net.POSTED!not-for-mail
References: <HobG6.253$Lw4.656473@nnrp4.proxad.net> <1135038.FpCBEx9A2H@ltgt.net>

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: 114f60,935aebe3b6637edb
X-Google-Attributes: gid114f60,public
X-Google-ArrivalTime: 2001-05-02 01:32:14 PST
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!proxad.net!feeder2-1.proxad.net!nnrp6.proxad.net.POSTED!not-for-mail
From: "Rapha�l THERY" <raphael.thery@free.fr>
Newsgroups: fr.comp.text.xml
References: <HobG6.253$Lw4.656473@nnrp4.proxad.net> <1135038.FpCBEx9A2H@ltgt.net>
Subject: Re: XPath et la difficult� de son �criture.
Lines: 48
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: <iCPH6.1867$vt6.23868538@nnrp6.proxad.net>
Date: Wed, 02 May 2001 08:32:14 GMT
NNTP-Posting-Host: 195.115.154.77
X-Complaints-To: abuse@proxad.net
X-Trace: nnrp6.proxad.net 988792334 195.115.154.77 (Wed, 02 May 2001 10:32:14 CEST)
NNTP-Posting-Date: Wed, 02 May 2001 10:32:14 CEST
Organization: Guest of ProXad - France