亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

XSLT generate-id() 函數(shù)

定義和用法

generate-id() 函數(shù)返回唯一標識指定節(jié)點的字符串值。

如果指定的節(jié)點集是空的,則返回空字符串。如果省略了 node-set 參數(shù),則默認設置為當前節(jié)點。

語法

string generate-id(node-set?)

參數(shù)

參數(shù) 描述
node-set 可選。規(guī)定生成哪個節(jié)點集的唯一 id。

例子

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
<body>
<h3>Artists:</h3>
<ul>
<xsl:for-each select="catalog/cd">
<li>
<a href="#{generate-id(artist)}">
<xsl:value-of select="artist" /></a>
</li>
</xsl:for-each>
</ul>
<hr />
<xsl:for-each select="catalog/cd">
Artist: <a name="{generate-id(artist)}">
<xsl:value-of select="artist" /></a>
<br />
Title: <xsl:value-of select="title" />
<br />
Price: <xsl:value-of select="price" />
<hr />
</xsl:for-each>
</body>
</html>
</xsl:template>

</xsl:stylesheet>

查看 XSL 文件查看 XSL 文件,查看結(jié)果