XSLT <xsl:copy-of> အအုပ်အချက်

အဆိုပါအအုပ်အချက်၏ အသုံးပြုခြင်း နှင့် အသုံးပြုခြင်း

<xsl:copy-of> အအုပ်အချက်သည် လက်တွေ့သည့် အချက်အလက်တစ်ခုကို ပုံစံပြုထားသည်

အမှတ်စဉ်:လတ်တလော လက်တွေ့သည့် အမှတ်မှတ်အမျိုးအစား အချက်အလက်များ အသုံးပြုရန် အသုံးပြုသည်

အကြောင်းကြားချက်:ဤအအုပ်အချက်သည် အသုံးပြုရန် အရာတခုခုကို သို့မဟုတ် အသုံးပြုရန် အရာတခုခုကို အပြီးအပိုင်းသို့ သင်္ဂြိုလ်တင်ကြည့်ရန် အသုံးပြုနိုင်သည်

အက္ခရာ

<xsl:copy-of select="expression"/>

ဗဟုသုတ

ဗဟုသုတ အမှတ် ဖော်ပြ
select expression လိုအပ်သည့်အရာများကိုရယူရန်သတ်မှတ်ပါ

နည်းပါး

အမှတ် 1

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="header">
  <tr>
  <th>Element</th>
  <th>Description</th>
  </tr>
</xsl:variable>
<xsl:template match="/">
  <html>
  <body>
  <table>
    <xsl:copy-of select="$header" />
    <xsl:for-each select="reference/record">
    <tr>
    <xsl:if test="category='XML'">
      <td><xsl:value-of select="element"/></td>
      <td><xsl:value-of select="description"/></td>
    </xsl:if>
    </tr>
    </xsl:for-each>
  </table>
  <br />
  <table>
    <xsl:copy-of select="$header" />
    <xsl:for-each select="table/record">
    <tr>
    <xsl:if test="category='XSL'">
      <td><xsl:value-of select="element"/></td>
      <td><xsl:value-of select="description"/></td>
    </xsl:if>
    </tr>
    </xsl:for-each>
  </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>