ล่าสุดการพัฒนาเว็บบทเรียน
 

XSLT <xsl:attribute-set> Element


<สมบูรณ์ XSLT ธาตุอ้างอิง

ความหมายและการใช้งาน

<xsl:attribute-set> องค์ประกอบสร้างชุดการตั้งชื่อของคุณลักษณะ แอตทริบิวต์ชุดสามารถนำไปใช้เป็นทั้งเอกสารการส่งออก

Note: ต้องเป็นลูกของ <xsl:stylesheet> หรือ <xsl:transform>


วากยสัมพันธ์

<xsl:attribute-set
name="name" use-attribute-sets="name-list">

  <!-- Content:xsl:attribute* -->

</xsl:attribute-set>

แอตทริบิวต์

คุณลักษณะ ความคุ้มค่า ลักษณะ
namename จำเป็นต้องใช้ ระบุชื่อของแอตทริบิวต์ที่กำหนด
use-attribute-setsname-list ไม่จำเป็น. พื้นที่รายการที่คั่นสีขาวของแอตทริบิวต์ชุดอื่น ๆ ที่จะใช้ในแอตทริบิวต์ชุด

ตัวอย่างที่ 1

สร้างแอตทริบิวต์ชุดที่สามารถนำไปใช้กับองค์ประกอบผลใด ๆ :

<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 ธาตุอ้างอิง