🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

[DEBUTANT] Lire les attributs en XSL

#9070
From: Ed
Date: Thu, 14 Jun 2001 13:54
39 lines
1791 bytes
J'ai l'XML  suivant en entree:

<category name="toto">
    <map>
    1
    </map>
    <map>
    2
    </map>
    <map>
    3
    </map>
</category>

et je veux generer celui ci:

<entry name="toto">
    <map>
    1
    </map>
</entry>

Pour cela j'ai ecrit le XSL suivant (je debute alors si vous vouyez des truc
bizarres, dites le moi!)

<xsl:template match='/category'>
  <xsl:element name='entry'>
  <xsl:attribute name="name"></xsl:attribute>
        <xsl:apply-templates select='map[1]'/>
  </xsl:element>
 </xsl:template>
(il y a ensuite un template qui gere le map, mais le probleme n'est pas la)

Ca marche (presque) mais je n'arrive pas a recuperer l'attribut 'name' de na
category pour en faire un attribut de mon entry.

Comment qu'on fait ?

Ed
Technical Details
Message-ID: <9gah5k$476$1@reader1.fr.uu.net>
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!fr.clara.net!heighliner.fr.clara.net!fr.colt.net!inetway!inetway.net!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII-7-bit
X-Google-Thread: 114f60,c2c1cbbfb181ce20,start
X-Google-Attributes: gid114f60,public
X-Google-ArrivalTime: 2001-06-14 06:54:36 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!fr.clara.net!heighliner.fr.clara.net!fr.colt.net!inetway!inetway.net!not-for-mail
From: "Ed" <ed@barret.org.no-spam-please>
Newsgroups: fr.comp.text.xml
Subject: [DEBUTANT] Lire les attributs en XSL
Date: Thu, 14 Jun 2001 15:54:27 +0200
Organization: UUNET
Lines: 43
Message-ID: <9gah5k$476$1@reader1.fr.uu.net>
NNTP-Posting-Host: gw-xlat-tr1.dev.amadeus.net
X-Trace: reader1.fr.uu.net 992528372 4326 194.133.91.29 (14 Jun 2001 14:19:32 GMT)
X-Complaints-To: abuse@fr.uu.net
NNTP-Posting-Date: 14 Jun 2001 14:19:32 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600