XSLT <xsl: atribut-set> elemen
Definisi dan Penggunaan
<XSL: atribut-set> elemen menciptakan satu set bernama atribut. Himpunan atribut (atribut-set) dapat diterapkan secara keseluruhan untuk dokumen output.
Catatan: Anda harus <xsl: stylesheet> atau <xsl: transform> node anak.
tatabahasa
<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>
milik
属性 | 值 | 描述 |
---|---|---|
name | name | 必需。规定属性集(attribute-set)的名称。 |
use-attribute-sets | name-list | 可选。在该属性集(attribute-set)中使用的其它属性集(attribute-set)的列表,由空格分隔。 |
contoh 1
Hal ini dapat diterapkan untuk membuat satu set atribut (atribut-set) setiap elemen keluaran:
<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>
Lengkap manual XSLT Elemen Referensi