XSLT <XSL: attribute-SET> องค์ประกอบ
ความหมายและการใช้งาน
<xsl: attribute-SET> องค์ประกอบสร้างชุดการตั้งชื่อของคุณลักษณะ ชุดของคุณลักษณะ (attribute-ชุด) สามารถนำไปใช้เป็นทั้งในเอกสารการส่งออก
หมายเหตุ: คุณจะต้องเป็น <XSL: สไตล์ชีต> หรือ <XSL: เปลี่ยน> เด็กโหนด
ไวยากรณ์
<xsl:attribute-set
name="name" use-attribute-sets="name-list">
<!-- Content:xsl:attribute* -->
</xsl:attribute-set>
name="name" use-attribute-sets="name-list">
<!-- Content:xsl:attribute* -->
</xsl:attribute-set>
คุณสมบัติ
属性 | 值 | 描述 |
---|---|---|
name | name | 必需。规定属性集(attribute-set)的名称。 |
use-attribute-sets | name-list | 可选。在该属性集(attribute-set)中使用的其它属性集(attribute-set)的列表,由空格分隔。 |
ตัวอย่างที่ 1
มันสามารถนำไปใช้สร้างชุดของคุณลักษณะ (attribute-ชุด) องค์ประกอบผลผลิตใด ๆ :
<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>
<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 ธาตุอ้างอิงที่สมบูรณ์