[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

attribute list

Subject: attribute list
From: "Paul Beer" <paul.beer@xxxxxxxxxxxx>
Date: Mon, 31 Jan 2000 14:18:50 -0500
list beer names
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.