I'm trying to transform this XML into an HTML table using XSLT.
I've posted the XSLT below. But this XSLT won't output anything for me except for plain text, what I need is an HTML table, though.
Any ideas would be appreciated.
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>7725</WindowHeight>
<WindowWidth>17790</WindowWidth>
<WindowTopX>0</WindowTopX>
<WindowTopY>0</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Worksheet ss:Name="Page1">
<Table ss:ExpandedColumnCount="22" ss:ExpandedRowCount="11465" x:FullColumns="1"
x:FullRows="1">
<Row ss:AutoFitHeight="0">
<Cell ss:StyleID="s62"><Data ss:Type="String">TERM CD</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">TERM LD</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">CAMPUS CD</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">SESSION CD</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">SESSION SD</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">SESSION LD</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">ACAD CAR CD</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">ACAD GRP CD</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>5</ActiveRow>
<ActiveCol>5</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>
I've come up with xslt below but it doesn't seem to work. Any ideas?
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/Workbook/Worksheet/Table">
<html>
<body>
<h2>University of Colorado Boulder</h2>
<table border="1">
<xsl:for-each select="Row">
<tr>
<xsl:for-each select="Cell/Data">
<td>
<xsl:value-of select="text()" />
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>