Hallo ich habe ein Problem mit XSLT.
Vorweg, ich will wissen, warum für den Ausdruck orginal nicht der Wert aus dem Entity eingefügt wird, warum er, wenn ich META-Angaben mache sagt, dass sie ENTITIES sein müssen und warum <xsl:element name="title"><xsl:value-of select="@titel" /></xsl:element> nicht angewendet wird?!
Ich hoffe mal ihr könnt mir da weiterhelfen!!!
Ich habe mir diesen Code geschrieben:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE maschine SYSTEM "dtd/welcome.dtd">
<?xml-stylesheet type="text/xsl" href="xsl/welcome.xsl"?>
<welcome titel="Eisenbahnclub Leinefelde e.V.">
<text>Willkommen auf den Webseiten des</text>
<logo quelle="orginal" alternative="Eisenbahnclub Leinefelde e.V." />
</welcome>
---
<!NOTATION png PUBLIC '-//TEI//NOTATION IETF RFC2083 Portable Network Graphics//EN'>
<!ENTITY orginal SYSTEM "./graphics/logo-orginal.png" NDATA png>
<!ELEMENT welcome (text, logo)>
<!ELEMENT text (#CDATA)>
<!ELEMENT logo EMPTY>
<!ATTLIST welcome
titel CDATA #REQUIRED
<!ATTLIST logo
quelle ENTITY #REQUIRED
alternative CDATA #REQUIRED
---
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output media-type="text/html" method="html" />
<xsl:template match="/">
<html>
<head>
<xsl:element name="title"><xsl:value-of select="@titel" /></xsl:element>
</head>
<body style="margin-left:auto;margin-right:auto;padding:0px;text-align:center;font-family:arial;font-size:2em;font-weight:bold">
<xsl:apply-templates />
</body>
</html>
</xsl:template>
<xsl:template match="text">
<p style="margin:0px;padding:0px"><xsl:value-of select="." /></p>
</xsl:template>
<xsl:attribute-set name="LOGO">
<xsl:attribute name="src"><xsl:value-of select="@quelle" /></xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="@alternative" /></xsl:attribute>
<xsl:attribute name="height">184px</xsl:attribute>
<xsl:attribute name="width">541px</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="logo">
<xsl:element name="img" use-attribute-sets="LOGO" />
</xsl:template>
</xsl:stylesheet>