【发布时间】:2011-08-08 20:45:16
【问题描述】:
嗨,我从我的 xsl 生成 html,我想为标签生成一个唯一的 id,这是为了在需要这个 id 的 xsl 内调用 js 中的函数... 这是我的 xsl 的简化示例
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:template match="/">
<xsl:for-each select="data/item">
<xsl:sort select="position()" data-type="number" order="descending"/>
<span id="spanDescription"/>
</xsl:for-each>
</div>
</xsl:template>
</xsl:stylesheet>
【问题讨论】:
标签: xslt