在xsl中true转yes的问题
在xsl中,接收到的值是true或者false,但是后台能接收的是yes/no,所以要转下,请问怎么转?我现在的代码如下,结果获取不到值。
<xsl:when test="@attribute-id='invoiceNeeded'"> ----判断是关于发票的信息
<ns0:echInvoiceRequested> ----最终需要把yes/no传到的字段
<xsl:variable name="a" select="." /> ----定义变量并把节点的值(true/false赋值过来)
<xsl:if test="a='true'" ----如果是true
<xsl:text>yes</xsl:text> ----就把yes传到echInvoiceRequested字段去
</xsl:if>
<xsl:if test="a='false'"> ----如果是false
<xsl:text>no</xsl:text> ----no传过去
</xsl:if>
</ns0:echInvoiceRequested>
</xsl:when>
谁告诉我怎么真正实现?
<xsl:when test="@attribute-id='invoiceNeeded'"> ----判断是关于发票的信息
<ns0:echInvoiceRequested> ----最终需要把yes/no传到的字段
<xsl:variable name="a" select="." /> ----定义变量并把节点的值(true/false赋值过来)
<xsl:if test="a='true'" ----如果是true
<xsl:text>yes</xsl:text> ----就把yes传到echInvoiceRequested字段去
</xsl:if>
<xsl:if test="a='false'"> ----如果是false
<xsl:text>no</xsl:text> ----no传过去
</xsl:if>
</ns0:echInvoiceRequested>
</xsl:when>
谁告诉我怎么真正实现?
...全文
相关推荐
xsl解析xml生成表格,表格行动态隐藏与显示
method="html" indent="yes"/> <xsl:template match="/"> <html> <head> <script> function toggleRow(id)
在xml中使用CSS和XSL
<xsl:output method="html" indent="yes"/> <!
xml xsl网页生成
"html" indent="yes"/> <xsl:template match="/"> <html> <body> <h2>Book Catalog</h2> <xsl:apply-templates
xml+xsl中分割字符
:call-template> </xsl:if> </xsl:template> <!
Debian 8下编译Mosquitto 1.6.12实现TLS 1.2安全通信
MQTT是一种轻量级物联网消息传输协议,其安全性高度依赖TLS加密通道的正确实现。在老旧但稳定的Debian 8系统中,系统源自带的Mosquitto 1.4.2因OpenSSL 1.0.1t兼容性限制,无法完整支持TLS 1.2及Let’s Encrypt现代证书链,导致客户端连接失败、证书验证错误等典型问题。本文聚焦于通过源码编译Mosquitto 1.6.12(最后一个兼容OpenSSL 1.0.x的稳定版),完成TLS协议栈重建、证书格式适配(PKCS#1私钥+ISRG Root X1显式信任链)、


