我愿建立一个表格结构,将头盔分到THEAD,并将数据分到TBODY:
Input XML:
<Rowsets>
<Rowset>
<Columns>
<Column Description="Date"/>
<Column Description="Time"/>
</Columns>
<Row>
<Date>DATA1</Date>
<Time>DATA2</Time>
</Row>
<Row>
<Date>DATA1</Date>
<Time>DATA2</Time>
</Rowset>
</Rowsets>
www.un.org/Depts/DGACM/index_spanish.htm The following XSLT does separates the Header and body but I can tates how to Pack the tags between the data rows:
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<HTML>
<BODY>
<TABLE>
<XSL:apply-templates/>
</TABLE>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="Columns|Row">
<tr><xsl:apply-templates/></tr>
</xsl:template>
<xsl:template match="Columns">
<thead><xsl:apply-templates/></thead>
</xsl:template>
<xsl:template match="Columns/*">
<th><xsl:apply-templates select="@Description"/></th>
</xsl:template>
<xsl:template match="Row/*">
<td><xsl:apply-templates/></td>
</xsl:template>
<Current hexachloroput:
<THEAD>
<TR>
<TH>Date</TH><TH>Time</TH>
</TR>
</THEAD>
<TR>
<TD>DATA1</TD><TD>DATA2</TD>
</TR>
<TR>
<TD>DATA1</TD><TD>DATA2</TD>
</TR>
How can I wrap the data rows with TBODY? Thanks!