องค์ประกอบ XSLT <xsl:attribute-set>

การกำหนดและการใช้งาน

<xsl:attribute-set> องค์ประกอบสามารถสร้างภาคชาติคุณสมบัติที่มีชื่อได้ ซึ่งภาคชาติคุณสมบัตินี้ (attribute-set) สามารถนำไปใช้เป็นทั้งหมดในเอกสารออก

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

ระบบทางภาษา

<xsl:attribute-set
name="name" use-attribute-sets="name-list">
  <!-- Content:xsl:attribute* -->
</xsl:attribute-set>

คุณสมบัติ

คุณสมบัติ ค่า คำอธิบาย
name name จำเป็น。กำหนดชื่อภาคชาติคุณสมบัติ
use-attribute-sets name-list เลือกตั้ง。รายชื่อภาคชาติคุณสมบัติอื่นที่ใช้ในภาคชาติคุณสมบัตินี้ แบ่งด้วยอากาศ

ตัวอย่าง

ตัวอย่าง 1

สร้างภาคชาติคุณสมบัติที่สามารถนำไปใช้กับอนุภาคออกทุกชิ้น (attribute-set) :

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