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

RE: XML to HTML... dynamic table headers from element

Subject: RE: XML to HTML... dynamic table headers from element names
From: "Alan K. Gay" <alan@xxxxxxxxxxxx>
Date: Wed, 30 Oct 2002 22:48:39 -0500
xsl dynamic column headers
Tx ... got that working... would you be willing to help me then loop
back through all the tables to get the data?  

You effectively solved a problem I hadn't mentioned, which is the
variable number of children within <table> and the variable children
names.  Spy designer doesn't do variable element names (all hard-coded
from schema) so I haven't learned this piece yet (Books on the way from
Amazon.)

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Adam Griffin
Sent: Wednesday, October 30, 2002 3:15 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE:  XML to HTML... dynamic table headers from element
names

something to the effect of... see below ... should work. (only first row
of
data, read their names) this would eliminate the need for position test
of
if block.

-adam

<tr>
<xsl:for-each select="Table[1]/*">
	<xsl:value-of select="local-name()"/>
</xsl:for-each>
</tr>



-----Original Message-----
From: Alan K. Gay [mailto:alan@xxxxxxxxxxxx]
Sent: Wednesday, October 30, 2002 2:56 PM
To: XSLT List
Subject:  XML to HTML... dynamic table headers from element names


Just getting my feet wet. using XMLSpy stylesheet designer to help
guide.   I'm converting XML to HTML, which is Microsoft's recommended
way of controlling the import of XML into Excel.  I've got the
stylesheet below in productive use.  However, I want to make one key
change. I want the name of XML elements to become the text column
headings so I can deal with files that have dynamic column names.

Suggestions appreciated.     

Here is typical XML:
<NewDataSet>
	<Table>
		<Name>Linda Britt</Name>
		<RFQCount>324</RFQCount>
		<RFQResponseCount>556</RFQResponseCount>
	</Table>
</NewDataSet>




 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.