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) ကို ဖန်တီးကြပါ (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>