以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XSL/XSLT/XSL-FO/CSS 』  (http://bbs.xml.org.cn/list.asp?boardid=8)
----  如何在xsl里进行与运算阿?谢谢大家!!!!  (http://bbs.xml.org.cn/dispbbs.asp?boardid=8&rootid=&id=50166)


--  作者:zhwccut
--  发布时间:7/18/2007 2:57:00 PM

--  如何在xsl里进行与运算阿?谢谢大家!!!!
那位达人指点下如何在xsl里进行与运算阿?谢谢大家!!!!

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<form name="form1" method="post" action="http://10.254.100.223/rel/cms-wfm-i/main.go?contentsId=2&amp;pageId=19&amp;division=1&amp;pageType=1">
<input type="hidden" name="place">
<xsl:attribute name="value"><xsl:value-of select="WeatherMailInfoResultVO/mailInfo/place" /></xsl:attribute></input>

<xsl:choose>

<xsl:when test="WeatherMailInfoResultVO/mailInfo/sendDate=127">
<xsl:element name="input">
<xsl:attribute name="type">checkbox</xsl:attribute>
<xsl:attribute name="name">eachday</xsl:attribute>
<xsl:attribute name="value">127</xsl:attribute>
<xsl:attribute name="checked"></xsl:attribute>毎日
</xsl:element>
</xsl:when>
<xsl:otherwise>
  <xsl:element name="input">
<xsl:attribute name="type">checkbox</xsl:attribute>
<xsl:attribute name="name">eachday</xsl:attribute>
<xsl:attribute name="value">127</xsl:attribute>
毎日
</xsl:element>
</xsl:otherwise>
</xsl:choose>

<xsl:choose>

<xsl:when test="WeatherMailInfoResultVO/mailInfo [(blFlag and ((sendDate and 1)=1))=true]">
<xsl:element name="input">
<xsl:attribute name="type">checkbox</xsl:attribute>
<xsl:attribute name="name">monday</xsl:attribute>
<xsl:attribute name="value">1</xsl:attribute>
<xsl:attribute name="checked"></xsl:attribute>月曜
</xsl:element>
</xsl:when>
<xsl:otherwise>
  <xsl:element name="input">
<xsl:attribute name="type">checkbox</xsl:attribute>
<xsl:attribute name="name">monday</xsl:attribute>
<xsl:attribute name="value">1</xsl:attribute>
月曜
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</form>
</xsl:template>
</xsl:stylesheet>


[color=#FF0000]<xsl:when test="WeatherMailInfoResultVO/mailInfo [(blFlag and ((sendDate and 1)=1))=true]">[/color]总是感觉这里有问题做与运算
不知道怎么写blFlag是bool型 ,(blFlag and ((sendDate and 1)=1))与运算结束后进行判断急死了在网上了很多也没查到不知道哪里错了?



W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
78.125ms