为什么取不到值
xml文件如下:
<?xml version="1.0" encoding="GB2312"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<document>
<report>
<class>甲班</class>
<q1>50</q1>
<q2>70</q2>
<q3>30</q3>
<q4>10</q4>
</report>
<report>
<class>乙班</class>
<q1>20</q1>
<q2>30</q2>
<q3>40</q3>
<q4>50</q4>
</report>
<report>
<class>丙班</class>
<q1>70</q1>
<q2>40</q2>
<q3>20</q3>
<q4>10</q4>
</report>
</document>
xsl文件如下:
<?xml version="1.0" encoding="GB2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TD/WD-xsl">
<xsl:template match="/">
<html>
<head>
<title>1999年生产统计</title>
</head>
<body>
<xsl:apply-templates select="document"/>
</body>
</html>
</xsl:template>
<xsl:template match="document">
<h3>1999年生产统计</h3>
<TABLE border="1" width="100%" cellpadding="0">
<TH>班组</TH>
<TH>一季度</TH>
<TH>二季度</TH>
<TH>三季度</TH>
<TH>四季度</TH>
<xsl:apply-templates select="report"/>
</TABLE>
</xsl:template>
<xsl:template match="report">
<TR>
<TD><xsl:value-of select="class"/></TD>
<TD><xsl:apply-templates select="q1"/></TD>
<TD><xsl:apply-templates select="q2"/></TD>
<TD><xsl:apply-templates select="q3"/></TD>
<TD><xsl:apply-templates select="q4"/></TD>
</TR>
</xsl:template>
<xsl:template match="q1|q2|q3|q4">
<xsl:if test="[value()$le$20]">
<xsl:attribute name="style">color:red</xsl:attribute>
</xsl:if>
<xsl:value-of/>
</xsl:template>
</xsl:stylesheet>
可是为什么><xsl:value-of select="class"/>没有取到值呢?帮帮我吧
<?xml version="1.0" encoding="GB2312"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<document>
<report>
<class>甲班</class>
<q1>50</q1>
<q2>70</q2>
<q3>30</q3>
<q4>10</q4>
</report>
<report>
<class>乙班</class>
<q1>20</q1>
<q2>30</q2>
<q3>40</q3>
<q4>50</q4>
</report>
<report>
<class>丙班</class>
<q1>70</q1>
<q2>40</q2>
<q3>20</q3>
<q4>10</q4>
</report>
</document>
xsl文件如下:
<?xml version="1.0" encoding="GB2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TD/WD-xsl">
<xsl:template match="/">
<html>
<head>
<title>1999年生产统计</title>
</head>
<body>
<xsl:apply-templates select="document"/>
</body>
</html>
</xsl:template>
<xsl:template match="document">
<h3>1999年生产统计</h3>
<TABLE border="1" width="100%" cellpadding="0">
<TH>班组</TH>
<TH>一季度</TH>
<TH>二季度</TH>
<TH>三季度</TH>
<TH>四季度</TH>
<xsl:apply-templates select="report"/>
</TABLE>
</xsl:template>
<xsl:template match="report">
<TR>
<TD><xsl:value-of select="class"/></TD>
<TD><xsl:apply-templates select="q1"/></TD>
<TD><xsl:apply-templates select="q2"/></TD>
<TD><xsl:apply-templates select="q3"/></TD>
<TD><xsl:apply-templates select="q4"/></TD>
</TR>
</xsl:template>
<xsl:template match="q1|q2|q3|q4">
<xsl:if test="[value()$le$20]">
<xsl:attribute name="style">color:red</xsl:attribute>
</xsl:if>
<xsl:value-of/>
</xsl:template>
</xsl:stylesheet>
可是为什么><xsl:value-of select="class"/>没有取到值呢?帮帮我吧
...全文
相关推荐
jquery 获得select、radio、checkbox选择的text和value值
获取选中项的 value 值```javascript// 获取名为 "month" 的 select 元素中被选中项的 value 值$("select[@name=month] option[@selected
vue select 获取value和lable操作
in options" :key="item.value" :label="item.label" :value="item.value"> </el-option></el-select>```在`
js里怎么取select标签里的值并修改
例如:```html<select name="company_id" id="company_id"> <option selected="selected" value="b">BBB</option
jQuery获取select选中的option的value值实现方法
为了更详细地说明知识点,这里再补充一些关于如何使用jQuery获取select选中option的value值的其他相关方法和注意事项:1.
element-ui 关于获取select 的label值方法
in userList" :key="item.id" :label="item.name" :value="item.id" ></el-option> </el-select></el-form-item


