1
我已经从xml格式的互联网存档下载了堆栈交换数据转储。我使用xslt将其转换为html。现在一切工作正常,除了表不自动调整。我已经将其分配为100%,并尝试使用div。任何帮助?为什么我的html表不能自动安装?
<table border="1" width="100%" cellspacing="0">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Body</th>
</tr>
<!-- for-each processing instruction
Looks for each element matching the XPAth expression
-->
<xsl:for-each select="posts/row">
<tr>
<td width="30%">
<!-- value-of processing instruction
process the value of the element matching the XPath expression
-->
<xsl:value-of select="@Title"/>
</td>
<td width="70%"><xsl:value-of select="@Body" disable-output-escaping="yes"/></td>
</tr>
</xsl:for-each>
</table>
我试着用外部CSS样式,但它也不起作用。它与xml数据的结构有什么关系?如果是这样,请查看这些数据,这些数据在互联网存档中。
还是同样的问题 –
@ user309358你能提供你的html代码吗? –
你在上面看到的是html的基本逻辑。我正在使用xslt以htmlesque格式显示xml –