PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : [xml - xslt] Problem beim Bild einfügen!


skinner13
22.01.08, 17:08:29
Hallo Community Freunde ;)

Ich habe ein kleines Problem beim erstellen von einem xslt stylesheet.

Die xml Datei:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="aufgabe17a.xsl"?>
<Show>
<Motto>Luftaufnahme Strand
<text>Show</text>
<Dia>
<Titel> Bild eines Strandes</Titel>
<Bild alt="Wellen" src="strand.jpg"/>
</Dia>
</Motto>

<Motto>Wald Bild
<text>Show</text>
<Dia>
<Titel> Bild eines Waldes </Titel>
<Bild alt="Gebirge" src="wald.jpg"/>
</Dia>
</Motto>
</Show>

Und das passende xslt Stylsheet dazu:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<head>
<Titel>Diashow</Titel>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="Dia">
<dl>
<dd>Titel:<xsl:value-of select="Titel"/></dd>
<dd>
<svg width="400px" height="200px" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<rect x="0" y="0" width="150" height="150" fill="green" stroke="green" stroke-width="5px"/>
</svg>
</dd>
</dl>
</xsl:template>

<xsl:template match="text">
<p style="font-family:Arial; font-size:18px; font-weight:bold">
<xsl:apply-templates />
</p>
</xsl:template>

</xsl:stylesheet

Mein Problem liegt nun darin, das ich mittels dem xslt Stylesheet 2 Bilder (wald.jpg sowie strand.jpg) einfügen will. Die 2 Bilder sollen genau auf den 2 grünen svg Vierecken liegen.

Hat jemand ne Idee?

MFG skinner13