中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

XSLT xsl:attribute 元素


XSLT 元素參考手冊 完整的 XSLT 元素參考手冊

定義和用法

<xsl:attribute>元素用于向元素添加屬性。

注釋:<xsl:attribute> 元素會替換名稱相同的已有屬性。


語法

<xsl:attribute name="attributename" namespace="uri">

<!-- Content:template -->

</xsl:attribute>

屬性

屬性 描述
name attributename 必需。規(guī)定屬性的名稱。
namespace URI 可選。為屬性定義命名空間的 URI。

實(shí)例 1

向 picture 元素添加 source 屬性:

<picture>
<xsl:attribute name="source"/>
</picture>

實(shí)例 2

向 picture 元素添加 source 屬性,并使用 "images/name" 中的值為其賦值:

<picture>
<xsl:attribute name="source">
<xsl:value-of select="images/name" />
</xsl:attribute>
</picture>

實(shí)例 3

創(chuàng)建能夠應(yīng)用到任何輸出元素的屬性集:

<xsl:attribute-set name="font">
<xsl:attribute name="fname">Arial</xsl:attribute>
<xsl:attribute name="size">14px</xsl:attribute>
<xsl:attribute name="color">red</xsl:attribute>
</xsl:attribute-set>

XSLT 元素參考手冊 完整的 XSLT 元素參考手冊其他擴(kuò)展