XSL - How to disable output escaping for an attribute?

后端 未结 2 1426
我寻月下人不归
我寻月下人不归 2020-12-16 19:08

I\'ve had the following tag:

...

One

相关标签:
2条回答
  • 2020-12-16 19:26

    You can generate your <a> as text:

    <xsl:text disable-output-escaping="yes">&lt;a href="</xsl:text>
    <xsl:value-of select="concat('http://myserver/_forms?url=', @FileRef, '&amp;id=5')" disable-output-escaping="yes" />
    <xsl:text disable-output-escaping="yes">" &gt;/a&lt;</xsl:text>
    
    0 讨论(0)
  • 2020-12-16 19:29

    I know I'm a bit late on this, but I think the attribute tag is the way to, you just don't want to concat...

    <a>
      <xsl:attribute name="href">
        http://myserver/_forms?url=<xsl:value-of select="@FileRef" disable-output-escaping="yes" />&amp;id=5
      </xsl:attribute>
    </a>
    
    0 讨论(0)
提交回复
热议问题