Sorry in dem Moment ging es mir nur um die eine Zeile, weil ich dachte da meckert der Explorer:
Ich habe nochmal die komplette XSL Datei angehangen. Dies ist der aktuelle Stand der Übersetung auf den neuen www.w3.org/1999/XSL/Transform Standdard.
Aktuell hänge ich bei dem Befehl xsl:node-name und den Befhel wie er jetzt im neuen Standard heisst.
Für Hilfe wäre ich sehr dankbar, da ich nicht wirklich XML Entwickler bin komme eher von der SAP Schiene.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <head> <style type="text/css"> td { font-family:arial; font-size:10pt; } </style> </head> <body> <xsl:apply-templates select="obj" /> <xsl:apply-templates select="result" /> </body> </html> </xsl:template>
<xsl:template match="obj"> <table> <tr> <td valign="top"> <img src="../style/folder.gif" border="0" style="cursor:hand" onClick="document.all[this.sourceIndex+3].style.display = (document.all[this.sourceIndex+3].style.display=='none') ? '' : 'none';" /> </td> <td><b> xsl:choose <xsl:when test="@type='pack'">Packvorschrift </xsl:when> <xsl:when test="@type='amat'">Verpackungsmaterial </xsl:when> <xsl:when test="@type='pmat'">Teilenummer </xsl:when> </xsl:choose> <xsl:value-of select="@name" /></b></td> </tr> <tr> <td></td> <td> <xsl:apply-templates select="sub" /> <xsl:apply-templates select="docs" /> <xsl:apply-templates select="pmat" /> <xsl:apply-templates select="alad" /> <xsl:apply-templates select="amat" /> </td> </tr> </table> </xsl:template>
<xsl:template match="result"> <table> <tr> <td valign="top"> <img src="../style/folder.gif" border="0" style="cursor:hand" onClick="document.all[this.sourceIndex+3].style.display = (document.all[this.sourceIndex+3].style.display=='none') ? '' : 'none';" /> </td> <td><b>Suchergebnis (<xsl:value-of select="@count" /> Treffer)</b></td> </tr> <tr> <td></td> <td> <xsl:apply-templates select="item" /> </td> </tr> </table> </xsl:template>
<xsl:template match="sub"> <table> <tr> <td valign="top"> <img src="../style/folder.gif" border="0" style="cursor:hand" onClick="document.all[this.sourceIndex+3].style.display = (document.all[this.sourceIndex+3].style.display=='none') ? '' : 'none';" /> </td> <td> <a> <xsl:attribute name="href"> filter.php?type=<xsl:value-of select="@type" />&obj=<xsl:value-of select="@name" /> </xsl:attribute> xsl:choose <xsl:when test="@type='pack'"><b>PV </b></xsl:when> <xsl:when test="@type='amat'">Verpackungsmaterial </xsl:when> <xsl:when test="@type='pmat'">Teilenummer </xsl:when> </xsl:choose> <b><xsl:value-of select="@name" /></b> (<xsl:value-of select="@lmat" /> / <xsl:value-of select="@vpart" />) </a> </td> </tr> <tr> <xsl:attribute name="style"> display:none </xsl:attribute> <td></td> <td> <xsl:apply-templates select="docs" /> <xsl:apply-templates select="pmat" /> <xsl:apply-templates select="amat" /> </td> </tr> </table> </xsl:template>
<xsl:template match="docs"> <table> <tr> <td valign="top"> <img src="../style/folder.gif" border="0" style="cursor:hand" onClick="document.all[this.sourceIndex+2].style.display = (document.all[this.sourceIndex+2].style.display=='none') ? '' : 'none';" /> </td> <td>Dokumente</td> </tr> <tr> <td></td> <td> <xsl:apply-templates select="link" /> </td> </tr> </table> </xsl:template>
<xsl:template match="alad"> <table> <tr> <td valign="top"> <img src="../style/folder.gif" border="0" style="cursor:hand" onClick="document.all[this.sourceIndex+2].style.display = (document.all[this.sourceIndex+2].style.display=='none') ? '' : 'none';" /> </td> <td>Ladungsträger</td> </tr> <tr> <xsl:attribute name="style"> display:none </xsl:attribute> <td></td> <td> <xsl:apply-templates select="link" /> </td> </tr> </table> </xsl:template>
<xsl:template match="amat"> <table> <tr> <td valign="top"> <img src="../style/folder.gif" border="0" style="cursor:hand" onClick="document.all[this.sourceIndex+2].style.display = (document.all[this.sourceIndex+2].style.display=='none') ? '' : 'none';" /> </td> <td>Verpackungsmaterial</td> </tr> <tr> <xsl:attribute name="style"> display:none </xsl:attribute> <td></td> <td> <xsl:apply-templates select="link" /> </td> </tr> </table> </xsl:template>
<xsl:template match="pmat"> <table> <tr> <td valign="top"> <img src="../style/folder.gif" border="0" style="cursor:hand" onClick="document.all[this.sourceIndex+2].style.display = (document.all[this.sourceIndex+2].style.display=='none') ? '' : 'none';" /> </td> <td>Verwendung</td> </tr> <tr> <xsl:attribute name="style"> display:none </xsl:attribute> <td></td> <td> <xsl:apply-templates select="link" /> </td> </tr> </table> </xsl:template>
<xsl:template match="item"> <table> <tr> <td valign="top"> <img src="../style/downhere.gif" border="0" /> </td> <td> <a> <xsl:attribute name="href"> filter.php?type=<xsl:value-of select="@type" />&obj=<xsl:value-of select="@obj" /> </xsl:attribute> <xsl:value-of select="@name" /> </a> </td> </tr> </table> </xsl:template>
<xsl:template match="link"> <table> <tr> <td valign="top"> <img src="../style/downhere.gif" border="0" /> </td> <td> xsl:choose <xsl:when test="@url"> <a> <xsl:attribute name="href"> filter.php?type=<xsl:node-name select=".." />&obj=<xsl:value-of select="@url" /> </xsl:attribute> <xsl:value-of select="@name" /> </a> </xsl:when> xsl:otherwise <xsl:value-of select="@name" /> </xsl:otherwise> </xsl:choose> </td> </tr> </table> </xsl:template>
<xsl:template match="link[@alt]"> <table> <tr> <td valign="top"> <img src="../style/downhere.gif" border="0" /> </td> <td> xsl:choose <xsl:when test="@url"> <a> <xsl:attribute name="href"> filter.php?type=<xsl:node-name select=".." />&obj=<xsl:value-of select="@url" /> </xsl:attribute> <xsl:value-of select="@name" /> </a> </xsl:when> xsl:otherwise <xsl:value-of select="@name" /> </xsl:otherwise> </xsl:choose>
xsl:choose <xsl:when test="@alt='X'"> (alternativ) </xsl:when> </xsl:choose> </td> </tr> </table> </xsl:template>
<xsl:template match="link[@type]"> <table> <tr> <td valign="top"> <img src="../style/doc.gif" border="0"> <xsl:if test="@date"> <xsl:attribute name="alt">Datum <xsl:value-of select="@date" /></xsl:attribute> </xsl:if> </img> </td> <td> <xsl:attribute name="nowrap"> </xsl:attribute>
xsl:choose <xsl:when test="@url"> <a target="File"> <xsl:attribute name="href"> ../<xsl:value-of select="@url" /> </xsl:attribute> xsl:choose <xsl:when test="@type='AUF'">Aufbauanleitung</xsl:when> <xsl:when test="@type='AUS'">Auspackanweisung</xsl:when> <xsl:when test="@type='CAD'">CAD-Zeichnung</xsl:when> <xsl:when test="@type='ZLA'">Zusammenlegeanweisung</xsl:when> <xsl:when test="@type='PAC'"><xsl:value-of select="@name" /></xsl:when> </xsl:choose> </a> </xsl:when> xsl:otherwise xsl:choose <xsl:when test="@type='AUF'">Aufbauanleitung</xsl:when> <xsl:when test="@type='AUS'">Auspackanweisung</xsl:when> <xsl:when test="@type='CAD'">CAD-Zeichnung</xsl:when> <xsl:when test="@type='ZLA'">Zusammenlegeanweisung</xsl:when> <xsl:when test="@type='PAC'"><xsl:value-of select="@name" /></xsl:when> </xsl:choose> </xsl:otherwise> </xsl:choose>
xsl:choose <xsl:when test="@version"> (<xsl:value-of select="@version" />) </xsl:when> </xsl:choose> </td> </tr> </table> </xsl:template> </xsl:stylesheet>