打印

请教XML教程中一句E文的含义

see also :
http://www.w3schools.com/xsl/xsl_if.asp

Where to put the IF condition
To put a conditional if test against the content of the file, simply add an <xsl:if> element to your XSL document like this:

<xsl:if test="price &gt; 10">
  some output ...
</xsl:if>

The value of the required test attribute contains the expression to be evaluated.

请问红色的那个句子是什么意思阿?
Stop preparing right away !
明白大概的意思,从XML:IF的语法说起。
<xsl:if expr="script-expression" language="language-name" test="pattern">
expr:脚本语言表达式,计算结果为true or false 如果结果为true,切通过test才输出其中内容(可省略此属性)
language:expr属性中表达式的脚本语言类型,与html中的一样,JScript为默认。
test:源数据测试条件。设定条件的叙述表达式。(此属性必须有)

也就是说:只有当expr的值传回true(或者test属性设置的条件成立),<xsl:if>中的内容才会被XSL处理器处理。
Stop preparing right away !
真的看一懂红色的一句是什么意思。
奇奇
简化一下:the value contains the expresssion.也就是这个数值包含表达式。

再细看修饰成分:什么样的value?  是 the required test attribute 所需检测的属性的值
什么样的表达式呢? 是to be evaluated,将要被评价或者评估的表达式。

当然这只是从语法结构上,通顺的翻译应该结合上下文。例如这里的test可能就不是检测的意思而是特指源数据测试条件。以此类推。

TOP

还在为头像烦恼?还在为不能关注好友动态烦忧?快来蓝色理想家园吧!
必须的test属性的值包含将要被计算/求值的表达式

test这里最好不翻译出来

evaluate在编程中是计算或者求值的意思

TOP