Subject: RE: [xsl] XML to HTML... dynamic table headers from element names From: "Alan K. Gay" <alan@xxxxxxxxxxxx> Date: Wed, 30 Oct 2002 22:48:39 -0500 |
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: [xsl] 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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XML to HTML... dynamic ta, Adam Griffin | Thread | RE: [xsl] XML to HTML... dynamic ta, Adam Griffin |
Re: [xsl] Sorry about the wrong sub, john liao | Date | RE: [xsl] re-printing xml, Jarno . Elovirta |
Month |