Hallo Wissende,
ich habe mittels folgendem Code, den ich den SeflHtml-Seiten entnahm eine CSS-Datei in meine XSL-Datei eingebunden.
Leider werden die Styles aber nicht richtig formatiert? Bilder, Farben und Ausrichtungen - nichts stimmt. Ich würde sagen, dass überhaupt nichts durch die CSS-Datei formatiert wurde.
Die index.CSS liegt definitiv im gleichen Ordner wie die XSL-Datei.
<?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>
<xsl:processing-instruction name="xml-stylesheet">
xsl:fallback
<link rel="stylesheet" href="index.css" type="text/css" />
</xsl:fallback>
xsl:texthref="index.css" type="text/css" ?</xsl:text>
</xsl:processing-instruction>
</head>
<body>
<table cellpadding="0" cellspacing="0" style="width:99%;border:1px solid gray;padding:5px;margin:5px;">
<tr>
<th style="text-align:left;">Vorname</th><!--dieser Code geht-->
<th class="players">Nachname</th><!--dieser Code nicht-->
<th class="players">Nation</th>
<th class="players">Geb.</th>
<th class="players">Grösse</th>
<th class="players">Gewicht</th>
</tr>
<xsl:for-each select="glossar/eintrag">
<tr>
<td valign="top"><xsl:value-of select="first_name" /></td>
<td valign="top"><xsl:value-of select="second_name" /></td>
<td valign="top"><xsl:value-of select="country" /></td>
<td valign="top"><xsl:value-of select="birthdate" /></td>
<td valign="top"><xsl:value-of select="height" /></td>
<td valign="top"><xsl:value-of select="weight" /></td>
</tr>
<tr>
<td valign="top" colspan="6"><hr /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>