XSLT <xsl:attribute> အကျုံးစိတ်

အသုံးပြုခြင်း နှင့် အပြုအရင်

<xsl:attribute> အကျုံးစိတ်သည် အကျုံးစိတ်သို့ အကျိုးစား ပြင်ဆင်ရန် အသုံးပြုပါ

ဖော်ပြချက်:<xsl:attribute> အကျုံးစိတ်သည် အဘယ်အမည်မှာ ရှိသော အကျုံးစိတ်ကို ပြောင်းလဲပါ

အပြောအဆ

<xsl:attribute name="attributename" namespace="uri">
  <!-- Content:template -->
</xsl:attribute>

အကျုံးစိတ်

အကျုံးစိတ် အရေးယူ ဖော်ပြ
name attributename စံနစ် အကျုံးစိတ်သို့ အကျိုးစား အမည် ချမှတ်ပါ
namespace URI ဆိုင်းငံး အကျုံးစိတ်အကျိုးစား မည်သည့် နေရာမှာ အသုံးပြုနိုင်သော နေရာမှာ အမည်ပြုပါ

အကျိုးသုံး

အမှတ် 1

picture အကျုံးစိတ်သို့ source အကျိုးစား ပြင်ဆင်ပါ

<picture>
  <xsl:attribute name="source"/>
</picture>

အမှတ် 2

picture အကျုံးစိတ်သို့ source အကျိုးစား ပြင်ဆင်ပြီး "images/name" အရ သုံးစွဲပါ

<picture>
  <xsl:attribute name="source">
    <xsl:value-of select="images/name" />
  </xsl:attribute>
</picture>

အမှတ် 3

တူးဖက်တွင် အသုံးပြုနိုင်သော အကျုံးစိတ်အကျိုးစား ပုံစံအသုံးပြုပါ

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