Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 如何在XSLT中以变量名使用concat()?_Xml_Xslt - Fatal编程技术网

Xml 如何在XSLT中以变量名使用concat()?

Xml 如何在XSLT中以变量名使用concat()?,xml,xslt,Xml,Xslt,我想做的就是这样 XSLT <xsl:variable name="concat('var',1)" select="'content of variable'"/> 有没有办法在变量名中使用concat 提前非常感谢。不,这几乎不可能,因为XSLT处理器在编译时解析变量名。例如,请参见本讨论: 我建议您重新排列XSLT样式表,以消除这种构造的需要,即具有动态名称的变量。如果您包含更多样式表并揭示了它们背后的意图,那么可以帮助您重写代码 顺便说一句,如果您还计划动态创建可变内容,

我想做的就是这样

XSLT

<xsl:variable name="concat('var',1)" select="'content of variable'"/>
有没有办法在变量名中使用concat


提前非常感谢。

不,这几乎不可能,因为XSLT处理器在编译时解析变量名。例如,请参见本讨论:

我建议您重新排列XSLT样式表,以消除这种构造的需要,即具有动态名称的变量。如果您包含更多样式表并揭示了它们背后的意图,那么可以帮助您重写代码


顺便说一句,如果您还计划动态创建可变内容,那么有一些合理的方法。

您不能这样做。不知道为什么你也会。
error: The '(' character, hexadecimal value 0x28, cannot be included in a name.