【问题标题】:xsl transform generating xsl stylesheet in a .net environmentxsl 转换在 .net 环境中生成 xsl 样式表
【发布时间】:2017-08-22 00:47:25
【问题描述】:

在 myVar2 中使用 myVar1 变量需要什么 xsl?我正在使用 xsl 转换来生成新的样式表。

    <xsl:element name="variable"><xsl:attribute name="myVar1">test value</xsl:attribute> </xsl:element>

    <xsl:element name="variable">
      <xsl:attribute name="myVar2" />
      <xsl:element name="xsl:value-of">
        <xsl:attribute name="select">
          /root/child[@myattr1='$myVar1']/@value      <!--Help here-->
        </xsl:attribute>
      </xsl:element>
    </xsl:element>
  </xsl:template>

【问题讨论】:

    标签: c# asp.net xslt


    【解决方案1】:

    我想你是说

    <xsl:attribute name="select">
      <xsl:value-of select="concat('/root/child[@myattr1=',$myVar1,']/@value')"/>
    </xsl:attribute>
    

    【讨论】:

      猜你喜欢
      • 2021-01-27
      • 2012-04-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-06
      • 2015-10-13
      • 1970-01-01
      • 2012-05-24
      • 1970-01-01
      相关资源
      最近更新 更多