大家来看看这个站点

jueban9818 2003-08-31 01:21:54
http://www.icesnow.net//xml/xml_ole/txt_1AFA34A7F984EEABDBB0A7D494132EE5.xml
http://www.icesnow.net/xmlsop/xsl/news.xsl

<table width="96%" border="0" align="center" cellpadding="2" cellspacing="2" class="pt9">
<xsl:for-each select="xmldata" order-by="title">
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><h4><xsl:value-of select="title"/> </h4></td>
</tr>
<tr>
<td align="center"><xsl:value-of select="times"/></td>
</tr>
</xsl:for-each>
<tr>
<td><hr size="1"></hr>
</td>
</tr>
<tr>
<td>
********* <table align="right" border="0" cellpadding="1" width="302">
<xsl:for-each select="xmldata/photo" order-by="title">
<tr>
<td><xsl:element name="a">
<xsl:attribute name="href">../../img/up/<xsl:value-of /></xsl:attribute>
<xsl:attribute name="target">_blank<xsl:value-of /></xsl:attribute>
<xsl:element name="img">
<xsl:attribute name="src">../../img/up/<xsl:value-of /></xsl:attribute>
<xsl:attribute name="align">right</xsl:attribute>
<xsl:attribute name="width">300</xsl:attribute>
<xsl:attribute name="border">1</xsl:attribute>
<xsl:attribute name="link">../../img/up/<xsl:value-of /></xsl:attribute>
</xsl:element>
</xsl:element>
</td>
</tr>
</xsl:for-each>
</table> **********

<xsl:for-each select="xmldata/main" order-by="title">
<xsl:eval no-entities="t">parseXML(this.text)</xsl:eval>
</xsl:for-each>
</td>
</tr>
<xsl:script language="javascript"> function parseXML(txt){ return(txt.replace(/[<]/g,"&lt;").replace(/\n/g,"<br>").replace(/\s/g,"&nbsp;"))
} </xsl:script>
<tr>
<td align="right"></td>
</tr>
</table>

星号内的表格代码,是如何判断的?
假如没有图片的话,是不是也应该显示星号内的表格呀?
可是http://www.icesnow.net//xml/xml_ole/txt_1AFA34A7F984EEABDBB0A7D494132EE5.xml网页中却显示不出来表格啊?为什么呀?
...全文
23 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
jueban9818 2003-09-02
  • 打赏
  • 举报
回复
顶!
jueban9818 2003-08-31
  • 打赏
  • 举报
回复
<table align="right" border="0" cellpadding="1" width="302">
<xsl:for-each select="xmldata/photo" order-by="title">
<tr>
<td><xsl:element name="a">
<xsl:attribute name="href">../../img/up/<xsl:value-of /></xsl:attribute>
<xsl:attribute name="target">_blank<xsl:value-of /></xsl:attribute>
<xsl:element name="img">
<xsl:attribute name="src">../../img/up/<xsl:value-of /></xsl:attribute>
<xsl:attribute name="align">right</xsl:attribute>
<xsl:attribute name="width">300</xsl:attribute>
<xsl:attribute name="border">1</xsl:attribute>
<xsl:attribute name="link">../../img/up/<xsl:value-of /></xsl:attribute>
</xsl:element>
</xsl:element>
</td>
</tr>
</xsl:for-each>
</table>

这下好看多了~

我想问问,就是假如没有图片的话,这个表格是不是应该看到呀?表格前没有判断呀!
可是http://www.icesnow.net//xml/xml_ole/txt_1AFA34A7F984EEABDBB0A7D494132EE5.xml网页中却显示不出来表格啊?为什么呀?

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧