以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 XSL/XSLT/XSL-FO/CSS 』  (http://bbs.xml.org.cn/list.asp?boardid=8)
----  请问如何检测value是否为空  (http://bbs.xml.org.cn/dispbbs.asp?boardid=8&rootid=&id=14198)


--  作者:nbxx
--  发布时间:2/1/2005 7:22:00 PM

--  请问如何检测value是否为空
<xsl:template match="header">
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr align="center" valign="middle">
   <td></td>
   <xsl:for-each select="links">
   <td>
    <xsl:if test="href[value() $eq$ '']">
     <xsl:value-of select="header/links/name"/>
    </xsl:if>
    <a>
     <xsl:attribute name="href">
      <xsl:value-of />
     </xsl:attribute>
     <xsl:value-of select="header/links/name"/>
    </a>
   </td>
   </xsl:for-each>
   <td></td>
  </tr>
 </table>
</xsl:template>


55,放到IE6里面就只有背景色和<hr>了。连后面template里的image都没有T_T


--  作者:sam
--  发布时间:2/2/2005 10:40:00 AM

--  
<xsl:if test="href[. = '']">

--  作者:nbxx
--  发布时间:2/4/2005 3:09:00 AM

--  
谢谢,今天又买了本xml的书。发现上面写xml的数值存储是64位双精度,汗一个。
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
6,390.625ms