[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|