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>