xml 中param & variable 相关
这两天在Coding时发现,xml中所谓的变量是无法重复赋值的,其作用相当于平常意义上的常量。
1. param: 作为变量,param可以接受从外部传入的值。举例说明.net中调用xslt时如何传入参数:
#region Test
#endregion
注: 上述xslt中若需引入外部文件,则必须定义XmlResolver,否则可直接赋"null"。
test.xslt文件格式如下:
2. variable: 一般作为内部变量使用:
<xsl:variable name="Price" select="//Book/Price"></xsl:variable>
<xsl:value-of select="$Price"/>
浙公网安备 33010602011771号