عنصر <xsl:attribute-set> في XSLT

التعريف والاستخدام

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

Attribute

Attribute Value Description
name name Required. Specifies the name of the attribute set.
use-attribute-sets name-list Optional. List of other attribute sets used in this attribute set, separated by spaces.

Instance

Example 1

Create an attribute set (attribute-set) that can be applied to any output element:

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