五月综合缴情婷婷六月,色94色欧美sute亚洲线路二,日韩制服国产精品一区,色噜噜一区二区三区,香港三级午夜理伦三级三

您現(xiàn)在的位置: 365建站網(wǎng) > 建站教程 > XSLT 教程 > XSLT <xsl:attribute> 元素

XSLT <xsl:attribute> 元素

此節(jié)有 236 人學(xué)習(xí)過     參與評論

定義和用法

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

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

語法

<xsl:attribute name="attributename" namespace="uri">
  <!-- Content:template -->
</xsl:attribute>

屬性

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

實例

例子 1

向 picture 元素添加 source 屬性:

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

例子 2

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

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

例子 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>

如對本文有疑問,請?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會為你解答??! 點擊進入論壇

您可能感興趣的文章:

發(fā)表評論 (236人查看,0條評論)
請自覺遵守互聯(lián)網(wǎng)相關(guān)的政策法規(guī),嚴(yán)禁發(fā)布色情、暴力、反動的言論。
昵稱:
最新評論
------分隔線----------------------------
XSLT 教程目錄

其它欄目

· 建站教程
· 365學(xué)習(xí)

業(yè)務(wù)咨詢

· 技術(shù)支持
· 服務(wù)時間:9:00-18:00
365建站網(wǎng)二維碼

Powered by 365建站網(wǎng) RSS地圖 HTML地圖

copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號