Article View: fr.comp.text.xml
Article #9444Probl�me XSLT/XPath
From: Pierre-Charles David
Date: Fri, 06 Apr 2001 21:56
Date: Fri, 06 Apr 2001 21:56
39 lines
2089 bytes
2089 bytes
Salut.
J'ai un fichier contenant des entr�es bibliographiques de la forme:
<article id="OGB98" theme="MOPs" read="yes">
<title>The Reflexive Architecture of Guarana</title>
<author idref="a.oliva"/>
<author idref="ic.garcia"/>
<author idref="le.buzato"/>
<publication year="1998">Rapport technique (non publi�)</publication>
</article>
Je voudrais sortir une biblio class�e par th�mes (sur article/@theme).
En me basant sur un exemple dans "XSLT Programmer's Reference", j'ai d�fini:
<xsl:variable
name="unique-themes"
select="//article[not(@theme=preceding-sibling::article/@theme)]/@theme"/>
Plus loin:
<xsl:for-each select="$unique-themes">
<h2><xsl:value-of select="."/></h2>
<xsl:apply-templates select="//article[@theme=.]"> <!-- probleme ici -->
<xsl:sort select="@id"/>
</xsl:apply-templates>
</xsl:for-each>
En sortie, j'obtient juste la liste des th�mes (les <h2>).
L'expression utilis�e pour filtrer les articles ne retourne rien.
Pourtant, "." semble avoir la bonne valeur, puisque les th�mes
apparaissent. Si je fixe le theme (par exemple
"//article[@theme='MOPs']"), j'obtient bien les articles correspondant
� ce th�me...
Quelqu'un peut-il m'expliquer ce qui se passe, et comment m'en sortir ?
PS: j'utilise Instant Saxon 6.0.2 sous Win98.
Technical Details
Message-ID:
<wkofu9r8te.fsf@emn.fr>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!dispose.news.demon.net!demon!grolier!ciril.fr!univ-lille1.fr!news!univ-rennes1.fr!news.emn.fr!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,91dcbae30b4ee193,start X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-04-06 06:32:41 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!dispose.news.demon.net!demon!grolier!ciril.fr!univ-lille1.fr!news!univ-rennes1.fr!news.emn.fr!not-for-mail From: Pierre-Charles David <pcdavid@emn.fr> Newsgroups: fr.comp.text.xml Subject: Probl�me XSLT/XPath Date: 06 Apr 2001 13:56:45 -0800 Organization: Ecole des Mines de Nantes Lines: 39 Message-ID: <wkofu9r8te.fsf@emn.fr> NNTP-Posting-Host: dhcp75.info.emn.fr X-Newsreader: Gnus v5.7/Emacs 20.7