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
在XSLT中将字符串转换为xpath_Xslt - Fatal编程技术网

在XSLT中将字符串转换为xpath

在XSLT中将字符串转换为xpath,xslt,Xslt,我发现在xslt中将字符串转换为xpath很困难 XSLT <xsl:param name="name"/> <xsl:template match="/"> <xsl:if test="$name"> <xsl:message><xsl:value-of select="$name"/></xsl:message> <xsl:value-of select="$name"/>

我发现在xslt中将字符串转换为xpath很困难

XSLT

 <xsl:param name="name"/>

 <xsl:template match="/">
    <xsl:if test="$name">
      <xsl:message><xsl:value-of select="$name"/></xsl:message>
      <xsl:value-of select="$name"/>
    </xsl:if>
  </xsl:template>


参数“name”值(Xpath表达式)将从java传递。在XSL中,我应该做什么来考虑这个字符串作为XPath?< /P> < P>您所要的是类似于Perl语言的<代码> EVA/COD>函数,将字符串作为语言中的一个表达式来处理。这不是XSLT1.0或2.0本机提供的功能,尽管许多处理器通过扩展函数(例如)提供支持。当前的XSLT 3.0工作草案提供了类似的机制,即