内容简介:翻译自:https://stackoverflow.com/questions/3522088/embedding-xsl-code-inside-an-a-tag
我有一些包含URI的XML数据.我想列出ASP页面上的URI,但也想使用<
a>列表来点击它们.标签.但是,XSLT不允许您在标记中嵌入XSL命令,例如:
<xsl:for-each select="//uri">
<tr>
<td class="tdDetail">
More information
</td>
<td>
<a href="<xsl:value-of select="." />" alt="More information" target=_blank><xsl:value-of select="." /></a>
</td>
</tr>
</xsl:for-each>
如何在<uri>中包含该网址?<a href =“代码后的标签?
使用
the
<xsl:attribute>
element
具有非固定属性. <a alt="More information" target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="." />
</xsl:attribute>
<xsl:value-of select="." />
</a>
编辑:正如其他人所提到的,也可以使用 attribute value templates :
<a href="{.}" alt="More information" target="_blank">
<xsl:value-of select="." />
</a>
翻译自:https://stackoverflow.com/questions/3522088/embedding-xsl-code-inside-an-a-tag
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- YAML,另一种标记语言?不止是标记语言
- html5 – 用于span标记的Twitter Bootstrap工具提示(不适用于标记)
- 开发 地图标记工具 后记
- WPF标记扩展的笔记
- IOS自动进行View标记
- Pandoc 2.0.4 发布,标记格式转换工具
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Big Java Late Objects
Horstmann, Cay S. / 2012-2 / 896.00元
The introductory programming course is difficult. Many students fail to succeed or have trouble in the course because they don't understand the material and do not practice programming sufficiently. ......一起来看看 《Big Java Late Objects》 这本书的介绍吧!