🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

je voudrais le grand-p�re XPATH

#8729
From: Rapha�l THERY
Date: Tue, 21 Aug 2001 14:35
38 lines
2133 bytes
mauvaise pioche....

bonjour,

soit le flux xml suivant
<dir>
    <inclusion pattenr="*.java" mode="propag" />
    ...
    <dir>
        <exclusion pattenr="*.bak" />
        <dir>
            <inclusion pattern="*.java" />
        </dir>
    </dir>
</dir>

en �crivant une r�gle commune sur les inclusions, exclusions (xsl:template
match="inclusion|exclusion")
je souhaite d�tecter si un fils d'un anc�tre d�finis d�j� la m�me r�gle.

Question(s) :
- Comment identifier tous les anc�tres � l'exculsion du parent m�me
(ancestor - parent) ?
- Dans la mesure o� la r�gle est commune comment �crire l'expression pour en
d�duire le nom ?

Actuellement j'arrive � un truc comme cela :
=>
"ancestor::*/child::inclusion[@mode='propag'][@pattern=current()/@pattern]"
=>
"ancestor::*/child::exclusion[@mode='propag'][@pattern=current()/@pattern]"
la fusion en
=>  "ancestor::*/child::*[name() =
current()/name()][@mode='propag'][@pattern=current()/@pattern]"
provoque une erreur.

auriez-vous une id�e, merci
Rapha�l
Technical Details
Message-ID: <Jkug7.266$aJ3.1169557@nnrp3.proxad.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!chcgil2-snh1.gtei.net!cpk-news-hub1.bbnplanet.com!news.gtei.net!opentransit.net!wanadoo.fr!proxad.net!feeder2-1.proxad.net!nnrp3.proxad.net.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: 114f60,f74fa31dcdf12d11,start
X-Google-Attributes: gid114f60,public
X-Google-ArrivalTime: 2001-08-21 07:35:22 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!chcgil2-snh1.gtei.net!cpk-news-hub1.bbnplanet.com!news.gtei.net!opentransit.net!wanadoo.fr!proxad.net!feeder2-1.proxad.net!nnrp3.proxad.net.POSTED!not-for-mail
From: "Rapha�l THERY" <raphael.thery@free.fr>
Newsgroups: fr.comp.text.xml
Subject: je voudrais le grand-p�re XPATH
Lines: 41
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: <Jkug7.266$aJ3.1169557@nnrp3.proxad.net>
Date: Tue, 21 Aug 2001 14:35:21 GMT
NNTP-Posting-Host: 195.115.154.77
X-Complaints-To: abuse@proxad.net
X-Trace: nnrp3.proxad.net 998404521 195.115.154.77 (Tue, 21 Aug 2001 16:35:21 CEST)
NNTP-Posting-Date: Tue, 21 Aug 2001 16:35:21 CEST
Organization: Guest of ProXad - France