ulli: - xpath / document()

Beitrag lesen

Hallo,

hi

es scheint aber nicht zu funzen ..
die xml datei(die, die eingebunden werden soll):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<DATA>
  <LAYOUT id="0">
    <TABELLE>
      <tabBg>#99cc99</tabBg>
    </TABELLE>
  </LAYOUT>
  <LAYOUT id="1">
  </LAYOUT>
</DATA>

... ich möchte zB an tabBg ran ...

und das xsl sheet:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="iso-8859-1" />

<xsl:param name="layout" />

<xsl:template match="/">

<table style="position:relative;top:0px;left:0px" height="135px" cellpadding="30" cellspacing="0" width="100%" border="0">
      <xsl:attribute name="bgcolor">
        <xsl:value-of select="document(../xml/layout.xml)/DATA/LAYOUT[@id=$layout]/TABELLE/tabBg" />
      </xsl:attribute>
      <tr><td valign="bottom">

</td></tr>
      </table>

aber es steht nichts im bgcolor attribut drin ...