AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

XSL Problem

Ein Thema von Mussi0 · begonnen am 27. Aug 2007 · letzter Beitrag vom 30. Aug 2007
 
Mussi0

Registriert seit: 8. Jun 2006
55 Beiträge
 
#13

Re: XSL Problem

  Alt 30. Aug 2007, 08:01
Hi,

mir geht es nicht darum das du oder jmd. anderes mein XSL-T schreibt!!!
Ich möchte nur wissen wie ich folgendes durchgehe.

XML-Code:
...
<produkt>
  <attributbez>
    <sattributbez id="1">Typ</sattributbez>
    <sattributbez id="2">Korpus/Front</sattributbez>
    <sattributbez id="3">Gewicht in kg</sattributbez>
    <sattributbez id="4">Anzahl Fächer</sattributbez>
    <anzahl>4</anzahl>
  </attributbez>
...
XML-Code:
<?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>
  <title>Bestelltabelle</title>
  </head>
  <body>
    <table rules="all" width="200">
         <tr>      
            <xsl:apply-templates select="produkt" />            
         </tr>
    </table>
  </body>
  </html>
</xsl:template>

<xsl:template match="produkt/attributbez">
      <xsl:if test="anzahl >= sattributbez[@id]">
         <th><xsl:value-of select="sattributbez" /></th>
      </xsl:if>
</xsl:template>

</xsl:stylesheet>
Ich will einfach nur das mir die sAttributBez "variabel" je nach Anzahl der vorhanden ausgegeben wird und zwar so:

Code:
...
<tr>
 <th>Typ</th>
 <th>Korpus / Front</th>
 <th>Gewicht in kg</th>
 <th>Anzahl Fächer</th>
</tr>
...
Das funktioniert aber nicht mit dem XSL oben und deshalb hätte ich gerne einfach nur nen Tipp!!! Das ist genau das
gleiche wie mit den Preisen und Staffel die ich da vorher hatte nur halt mit diesen Eigenschaften, doch trotzdem
muss das ganze "variabel" sein!!

Gruß

muss!0
Wer die anderen neben sich klein macht ist nie groß.
von Johann Gottfried Seume

Website: http://mussio.funpic.de
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:35 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz