Jump to content

cpdev

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About cpdev

  • Rank
    Newbie
  1. Hi Ingolme, Thanks for your great answer. its solved. Br, Sebastian
  2. Hello Guys, I'm relatively new to XSLT and obviously I miss the wood for trees.... here is the XML I want to send to the Transformator (php simple_xml): <?xml version='1.0' standalone='yes'?> <master> <customer> <name>TEstkunde</name> <short>TK</short> <ref>0001</ref> </customer> <customer> <name>TEstkunde2</name> <short>TK2</short> <ref>0002</ref> </customer> </master> and here the XSL Stylesheet I copied and manipulated from W3 schools "XSL:For-each": <?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="/"> <table> <tr> <th>Kurzname</th> <th>Kundenname</th> <th>Kundenreferenznummer</th> <th>aktive Projekte</th> </tr> <xsl:for-each select="customer"> <tr> <td><xsl:value-of select="name" /></td> <td><xsl:value-of select="short" /></td> <td><xsl:value-of select="ref" /></td> <td><xsl:value-of select="proj" /></td> </tr> </xsl:for-each> <tr> <td><input type="text" caption="Kundenname" id="customer"/></td> <td><input type="text" caption="Kurzname" id="cust_short"/></td> <td><input type="text" caption="Kundenerferenznummer" id="cust_id" /></td> <td><input type="submit" value="+" /></td> </tr></table></xsl:template></xsl:stylesheet> For whatever reason, only the last row and the header is shown, but the data from the XML is omitted. Can you please point me in the right direction and possibly explain where I'm wrong? Thanks a lot. BR, Sebastian
×
×
  • Create New...