Zum Inhalt springen

XML / XSLT - Dateien einbinden

Erstellt am 28. März 2005 · Noch keine Antworten

Tags: Frage

olodum ·

Hi folks.

Kennt jemand eine Lösung um XML Dateien, die mittels XSLT formatiert und ausgegeben werden, in Typo3 (Content!!!) einzubinden? Ich kenne bis jetzt bei Typo3 nur die Möglichkeit reines HTML einzubinden, wobei dort das XSLT file nicht korrekt eingebunden wird. Cheers und besten Dank für Eure Bemühungen.

-----------------------------XML File ---------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Inhaltsliste SYSTEM "./Inhaltsliste.dtd">
<?xml-stylesheet type="text/xsl" href="XMLModule2WWWFormat.xsl" ?>
<inhaltsliste>
<inhalt interneinhaltnr="1">
<struktur>Generalbau_Beratung.gif</struktur>
<prozess>Prozess_Beratung.gif</prozess>
<titel>Beratung</titel>
<beschreibung></beschreibung>
<bildname>Beratung.gif</bildname>
<module>
<modul>
<modulname>Standard</modulname>
</modul>
</module>
</inhalt>
</inhaltsliste>
-----------------------------------------------------------------

-----------XSLT File ------------------------------------------

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<link rel="StyleSheet" href="./css/style.css" type="text/css" />
</link>
</head>
<body>

<xsl:apply-templates select="Inhaltsliste/Inhalt" />

</body>
</html>
</xsl:template>

<xsl:template match="Inhalt">

<table id="Generalbau" width="600" border="0" align="center">
<tr>
<th width="125"><xsl:value-of select="Titel" /></th>
<th width="275">Beschreibung</th>
<th width="100">Prozess</th>

</tr>
<tr>
<td width="100"><xsl:apply-templates select="Bildname" /></td>
<td width="400">
<table id="Generalbau" width="400" border="0" align="center">
<tr>
<td width="275"><xsl:value-of select="Beschreibung" /></td>
</tr>
<tr>
<td><xsl:apply-templates select="Struktur" /></td>
</tr>
</table>
</td>
<td width="100"><xsl:apply-templates select="Prozess" /></td>
</tr>
<tr>

</tr>

</table>

<table id="Generalbau" border="0" align="center">

<tr>

<xsl:apply-templates select="Module" />

</tr>
</table>

</xsl:template>

<xsl:template match="Module">
<td valign="top">
<table border="0" id="Generalbau" width="100">

<xsl:apply-templates select="Modul" />

</table>
</td>
</xsl:template>

<xsl:template match="Modul">
<tr>
<th width="100"><xsl:value-of select="./Modulname" /></th>
<tr>
</tr>
<td width="100"><xsl:apply-templates select="./Bildname" /></td>
</tr>
</xsl:template>

<xsl:template match="Bildname">

<img width="100" height="60" alt="" />
<xsl:attribute name="src">bild\<xsl:value-of select="." />
</xsl:attribute>
</img>


</xsl:template>

<xsl:template match="Struktur">

<img width="400" border="0" alt="" />
<xsl:attribute name="src">struktur\<xsl:value-of select="." />
</xsl:attribute>
</img>


</xsl:template>

<xsl:template match="Prozess">

<img width="100" height="60" alt="" />
<xsl:attribute name="src">prozess\<xsl:value-of select="." />
</xsl:attribute>
</img>


</xsl:template>

</xsl:stylesheet>

-------------------------------------------------------------