xml – XSLT:属性中的’xsl:value-of’

前端之家收集整理的这篇文章主要介绍了xml – XSLT:属性中的’xsl:value-of’前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有以下XSL转换:

<xsl:for-each select="refsect1[@id = 'seealso']/para/citerefentry">
  /// <seealso cref=""/>
  <xsl:value-of select="refentrytitle" />
</xsl:for-each>

如何将refentrytitle的值放在模板中seealso标记的cref属性中?

解决方法

I don’t understand how place the value of refentrytitle in the cref
attribute of the seealso tag in the template.

只需将表达式放在大括号内(这称为Attribute Value Templates或简称为AVT语法),如下所示:

<seealso cref="{refentrytitle}"/>

猜你在找的XML相关文章