XSLT <xsl: thuộc tính-set>
❮ Toàn bộ tham chiếu phần tử XSLT
Định nghĩa và Cách sử dụng
Phần tử <xsl: property-set> tạo một tập hợp các thuộc tính được đặt tên. Tập thuộc tính có thể được áp dụng toàn bộ cho tài liệu đầu ra.
Lưu ý: Phải là con của <xsl: stylesheet> hoặc <xsl: converter>.
Cú pháp
<xsl:attribute-set
name="name" use-attribute-sets="name-list">
<!-- Content:xsl:attribute* -->
</xsl:attribute-set>
Thuộc tính
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 |
ví dụ 1
Tạo một tập hợp thuộc tính có thể được áp dụng cho bất kỳ phần tử đầu ra nào:
<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>
❮ Toàn bộ tham chiếu phần tử XSLT