XSLT <xsl:attribute-set>
❮ ทำการอ้างอิงองค์ประกอบ XSLT ให้สมบูรณ์
ความหมายและการใช้งาน
<xsl:attribute-set> องค์ประกอบสร้างชุดแอตทริบิวต์ที่มีชื่อ ชุดแอตทริบิวต์สามารถใช้ได้กับเอกสารผลลัพธ์ทั้งหมด
หมายเหตุ:ต้องเป็นลูกของ <xsl:stylesheet> หรือ <xsl:transform>
ไวยากรณ์
<xsl:attribute-set
name="name" use-attribute-sets="name-list">
<!-- Content:xsl:attribute* -->
</xsl:attribute-set>
คุณลักษณะ
Attribute | Value | Description |
---|---|---|
name | name | Required. Specifies the name of the attribute-set |
use-attribute-sets | name-list | Optional. A white space separated list of other attribute-sets to use in the attribute-set |
ตัวอย่าง 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 ให้สมบูรณ์