🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Images et XSLT

#8703
From: Jean-Da
Date: Wed, 15 Aug 2001 05:00
61 lines
2865 bytes
Salut � tous.

Je ne suis jamais intervenu, �tant un "amateur". J'essai juste de
comprendre tout ce qui tourne autour d'xml � titre de curiosit�
intellectuelle.

Alors je lis un peu tout ce que je trouve sur le web, et j'essai.
Jusqu'� pr�sent, �a va. J'arrive � peu pr�s � faire ce que je veux,
traitements conditionnels, tris, pr�sentation "�volu�e"... Mais il y a
un truc que je n'arrive pas � faire, malgr� l'appui des docs officielles
sur XML et XSLT. C'est de g�n�rer l'affichage d'une image dont le nom
est dans mon fichier xml.

Voici un morceau de mon source xml :

<?xml version="1.0" encoding="utf-8"?>
<?xml:stylesheet href="t3.xsl" type="text/xsl" ?>
<!-- <?xml:stylesheet href="t3.css" type="text/css" ?> -->
<modeles_t3>
   <photo>moteur.jpg</photo>
   <modeles>
   ...
   </modeles>
</modeles_t3>

Et voici un morceau de la feuille de transformation telle que j'avais
cru comprendre devoir la coder :

<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
xmlns="http://www.w3.org/TR/REC-html40" result-ns="">
   <xsl:template match="/">
      <html>
         ...
         <body>
            <table border="0">
               <tr>
                  <td><img src="{modeles_t3/photo}" alt="moteur" /></td>
                  <td><img src="moteur.jpg" alt="moteur" /></td>
                  ...
               </tr>
            </table>
            ...
         </body>
      </html>
   </xsl:template>
</xsl:stylesheet>

J'ai mis 2 colonnes dans le tableau. La 1�re �tant ce que je souhaite
faire, la seconde �tant l� pour contr�le.
La seconde affiche bien l'image.
Mais je n'arrive pas � r�cup�rer le nom de l'image d�fini dans la
feuille xml par la premi�re instruction...

Auriez-vous des suggestions ?

Merci.

-- 
Jean-Da
... et les continents d�rivent, peinards...
Technical Details
Message-ID: <1ey65n5.mjktp3121wcdqN%jdseyres@free.fr>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!grolier!proxad.net!feeder2-1.proxad.net!nnrp1.proxad.net.POSTED!jdseyres

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: 114f60,d02143453b906a3a,start
X-Google-Attributes: gid114f60,public
X-Google-ArrivalTime: 2001-08-14 22:00:56 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!grolier!proxad.net!feeder2-1.proxad.net!nnrp1.proxad.net.POSTED!jdseyres
Newsgroups: fr.comp.text.xml
Subject: Images et XSLT
From: jdseyres@free.fr (Jean-Da)
Message-ID: <1ey65n5.mjktp3121wcdqN%jdseyres@free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Approved: Sarah Connors ?
User-Agent: MacSOUP/F-2.4.6
Lines: 61
Date: Wed, 15 Aug 2001 05:00:55 GMT
NNTP-Posting-Host: 213.228.12.95
X-Complaints-To: abuse@proxad.net
X-Trace: nnrp1.proxad.net 997851655 213.228.12.95 (Wed, 15 Aug 2001 07:00:55 CEST)
NNTP-Posting-Date: Wed, 15 Aug 2001 07:00:55 CEST
Organization: Guest of ProXad - France