Subject: attribute list From: "Paul Beer" <paul.beer@xxxxxxxxxxxx> Date: Mon, 31 Jan 2000 14:18:50 -0500 |
I am trying to loop through the child elements of an element using xslt and use the elemnt names of the child nodes as column headers for an html table. the xml packet looks like this <CUSTOMER> <CUSTOMER_ID>0000000026</CUSTOMER_ID> <COMPANY>Aero Atlanta Fl</COMPANY> <NAME>Aero Atlanta Flying Club</NAME> <MAILBOX></MAILBOX> <STREET>P.O. Box 819</STREET> <POSTCODE>30144</POSTCODE> <CITY>Kennesaw,</CITY> <PHONE></PHONE> <FAX></FAX> </CUSTOMER> what i want to do is dynamically display the child elements as headers in an html table, like this : <table> <tr> <td>CUSTOMER_ID</td><td>COMPANY</td><td>NAME</td><td>MAILBOX</td><td>STREET< /td><td>POSTCODE</td><td>CITY</td><td>PHONE</td><td>FAX</td> </tr> <table> this doesnt work: <TABLE cellpadding="3" border="2"> <TR> <xsl:for-each select="CUSTOMERS"> <TD><xsl:value-of select="@name"/></TD> </xsl:for-each> </TR> </table> I cant figure out how to get at the value of a child element name from within a recursive loop ..... any suggestions ? thanks, paul XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Encoding problem, sara . mitchell | Thread | Re: attribute list, Eric van der Vlist |
XSL FO: background of the whole pag, MURAKAMI Shinyu | Date | RE: question about call-template, Reid M. Pinchback |
Month |