ThomasM: XSLT-Prozessor-Fehler?

Beitrag lesen

Hallo Zul,

Was mache ich falsch? Ist mein XSL-Dokument fehlerhaft, rufe ich den XSLT-Prozessor falsch auf?

Beachte den Namensraum aus dem XML-Dokument auch im XSLT-Stylesheet (hier als config-Prefix verwendet):

<?xml version="1.0" encoding="utf-8"?>  
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:config="http://imbacms.org/config" exclude-result-prefixes="html config">  
 <xsl:output method="xml" indent="yes" encoding="utf-8" media-type="application/xhtml+xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>  
 <xsl:template match="/">  
  <html>  
   <head>  
    <title>Config</title>  
    <link rel="stylesheet" type="text/css" href="src/config.css"/>  
   </head>  
   <body>  
    <h1>Config</h1>  
    <xsl:apply-templates/>  
   </body>  
  </html>  
 </xsl:template>  
 <xsl:template match="config:group">  
  <h2>  
   <xsl:value-of select="@name"/>  
  </h2>  
  <dl>  
   <xsl:apply-templates/>  
  </dl>  
 </xsl:template>  
 <xsl:template match="config:value">  
  <dt>  
   <xsl:value-of select="@name"/>  
  </dt>  
  <dd>  
   <xsl:value-of select="@value"/>  
  </dd>  
 </xsl:template>  
</xsl:stylesheet>

Die PI xml-stylesheet kann übrigens entfallen.

Grüße,
Thomas