Hallo!
ich weiß einfach nicht was bei meiner xsl datei nicht korrekt ist.
also ich will diese xml datei:
XML
- <?xml version="1.0"?>
- <?xml:stylesheet href="umwandlung.xsl" type="html/xsl" ?>
- <kickerdata>
- <playerlist>
- <player id="1640998965" >
- <firstname>
- Hans
- </firstname>
- <familyname>
- Bauer
- </familyname>
- <playssince>
- 2000
- </playssince>
- <dateofbirth>
- 1991-04-28
- </dateofbirth>
- <active>
- true
- </active>
- </player>
- <player id="137126334" >
- <firstname>
- Steffen
- </firstname>
- <familyname>
- Harder
- </familyname>
- <playssince>
- 2001
- </playssince>
- <dateofbirth>
- 1986-11-01
- </dateofbirth>
- <active>
- true
- </active>
- </player>
- <player id="432342307" >
- <firstname>
- Raphael
- </firstname>
- <familyname>
- Pionke
- </familyname>
- <playssince>
- 2002
- </playssince>
- <dateofbirth>
- 1989-05-05
- </dateofbirth>
- <active>
- true
- </active>
- </player>
- <player id="1439975948" >
- <firstname>
- Fritz
- </firstname>
- <familyname>
- Walter
- </familyname>
- <playssince>
- 2003
- </playssince>
- <dateofbirth>
- 1963-01-01
- </dateofbirth>
- <active>
- true
- </active>
- </player>
- <player id="0" >
- <firstname>
- </firstname>
- <familyname>
- </familyname>
- <playssince>
- 1111
- </playssince>
- <dateofbirth>
- 1111-11-11
- </dateofbirth>
- <active>
- false
- </active>
- </player>
- </playerlist>
- <matchlist>
- <match>
- <date>
- 2010-06-05
- </date>
- <team1front>
- 1640998965
- </team1front>
- <team1back>
- 137126334
- </team1back>
- <team2front>
- 432342307
- </team2front>
- <team2back>
- 1439975948
- </team2back>
- <goals1>
- 15
- </goals1>
- <goals2>
- 1
- </goals2>
- </match>
- <match>
- <date>
- 2012-04-28
- </date>
- <team1front>
- 1640998965
- </team1front>
- <team1back>
- 0
- </team1back>
- <team2front>
- 137126334
- </team2front>
- <team2back>
- 0
- </team2back>
- <goals1>
- 12
- </goals1>
- <goals2>
- 11
- </goals2>
- </match>
- <match>
- <date>
- 1990-04-28
- </date>
- <team1front>
- 1640998965
- </team1front>
- <team1back>
- 0
- </team1back>
- <team2front>
- 137126334
- </team2front>
- <team2back>
- 0
- </team2back>
- <goals1>
- 15
- </goals1>
- <goals2>
- 4
- </goals2>
- </match>
- <match>
- <date>
- 2010-06-06
- </date>
- <team1front>
- 1640998965
- </team1front>
- <team1back>
- 137126334
- </team1back>
- <team2front>
- 432342307
- </team2front>
- <team2back>
- 1439975948
- </team2back>
- <goals1>
- 4
- </goals1>
- <goals2>
- 3
- </goals2>
- </match>
- <match>
- <date>
- 2012-07-28
- </date>
- <team1front>
- 1640998965
- </team1front>
- <team1back>
- 137126334
- </team1back>
- <team2front>
- 432342307
- </team2front>
- <team2back>
- 1439975948
- </team2back>
- <goals1>
- 14
- </goals1>
- <goals2>
- 13
- </goals2>
- </match>
- </matchlist>
- </kickerdata>
mit hilfe dieser xsl umwandeln:
HTML
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <html>
- <body>
- <h2>Die Playerlist</h2>
- <table border="1">
- <tr bgcolor="#9acd32">
- <th>Vorname</th>
- <th>Nachname</th>
- <th>"Kickert seit"</th>
- <th>Geburtsdatum</th>
- <th>Aktiv</th>
- </tr>
- <xsl:for-each select="kickernaut/playerlist/player">
- <tr>
- <td>
- <xsl:value-of select="firstname" />
- </td>
- <td>
- <xsl:value-of select="familyname" />
- </td>
- <td>
- <xsl:value-of select="playssince" />
- </td>
- <td>
- <xsl:value-of select="date" />
- </td>
- <td>
- <xsl:value-of select="active" />
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
die xsl datei habe ich mit nem tut zusammen gebastelt, habt ihr ne idee was ich anders machen muss damit ich alle player ausgelesen bekomme? oder ne seite wo es nochmal schritt für schritt erklärt wird?
mfg hans