🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#9324
From: Tom.
Date: Fri, 27 Apr 2001 16:21
21 lines
1983 bytes
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]/@Name
                                            ^^^
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: <1135038.FpCBEx9A2H@ltgt.net>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!proxad.net!feeder2-1.proxad.net!nnrp5.proxad.net.POSTED!not-for-mail
References: <HobG6.253$Lw4.656473@nnrp4.proxad.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-04-27 09:21:19 PST
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!proxad.net!feeder2-1.proxad.net!nnrp5.proxad.net.POSTED!not-for-mail
Message-ID: <1135038.FpCBEx9A2H@ltgt.net>
From: Tom. <ptittom+news@free.fr>
Subject: Re: XPath et la difficulté de son écriture.
Newsgroups: fr.comp.text.xml
References: <HobG6.253$Lw4.656473@nnrp4.proxad.net>
Lines: 21
Organization: </>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8Bit
Date: Fri, 27 Apr 2001 16:21:19 GMT
NNTP-Posting-Host: 193.252.183.129
X-Complaints-To: abuse@proxad.net
X-Trace: nnrp5.proxad.net 988388479 193.252.183.129 (Fri, 27 Apr 2001 18:21:19 CEST)
NNTP-Posting-Date: Fri, 27 Apr 2001 18:21:19 CEST