簡體   English   中英

.NET環境中的xsl轉換生成xsl樣式表

[英]xsl transform generating xsl stylesheet in a .net environment

我需要在myVar2中使用哪個xsl變量myVar1? 我正在使用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>

我想你是說

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM