🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

grouper des sorties

#9058
From: Fred Senis
Date: Thu, 07 Jun 2001 15:01
47 lines
1910 bytes
Salut,

Voil� j'ai un fichier du genre

<A>
 <B>
  <C>
   <Nom>Nom1</Nom>
   <Tech matiere="a"/>
  </C>
  <C>
   <Nom>Nom2</Nom>
   <Tech matiere="b"/>
  </C>
  <C>
   <Nom>Nom3</Nom>
   <Tech matiere="a"/>
  </C>
  ...etc...
 </B>
</A>

et je cherche � obtenir un r�sultat XHTML du genre
<...>
     <H1>a</H1>
     <OL>
        <LI>Nom1</LI>
        <LI>Nom3</LI>
     </OL>
     <H1>b</H1>
     <OL>
        <LI>Nom2</LI>
     </OL>

tri� dans l'ordre croisant des "@matiere"s puis des "Nom"s.

En gros, je voudrais factoriser les mati�res. Or par 
<xsl:for-each select="/A/B/C/Tech/@matiere>
	<xsl:sort/>
	...
</xsl:for-each>
me double les "a". Vu qu'on ne peut pas v�rifier avec une variable,
j'avoue ne pas trop savoir par quoi passer pour m'en sortir...

PS : C'est pour faire une sorte de sommaire...
-- 
Fred - Depuis son doux foyer
Technical Details
Message-ID: <qk4vht0md9838p5pacq7av046l6d8ga4rd@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!opentransit.net!wanadoo.fr!isdnet!frmug.org!caduceus.dyndns.org!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: 114f60,d41f21f6059dda6e,start
X-Google-Attributes: gid114f60,public
X-Google-ArrivalTime: 2001-06-07 08:05:20 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!opentransit.net!wanadoo.fr!isdnet!frmug.org!caduceus.dyndns.org!not-for-mail
From: Fred Senis <fs@caduceus.fr.eu.org>
Newsgroups: fr.comp.text.xml
Subject: grouper des sorties
Date: Thu, 07 Jun 2001 17:01:48 +0200
Organization: Desorganization Unlimited
Lines: 47
Sender: cfo-fs@zordin.caduceus.fr.eu.org
Message-ID: <qk4vht0md9838p5pacq7av046l6d8ga4rd@4ax.com>
NNTP-Posting-Host: zordin.caduceus.fr.eu.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: caduceus.dyndns.org 991922534 16357 192.168.1.5 (7 Jun 2001 14:02:14 GMT)
X-Complaints-To: news@caduceus.dyndns.org
NNTP-Posting-Date: 7 Jun 2001 14:02:14 GMT
X-Newsreader: Forte Agent 1.8/32.548