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>