XSLT လုပ်ဆောင်ချက်-available() လုပ်ဆောင်ချက်
❮ XSLT လုပ်ဆောင်ချက် အကိုးအကားအဓိပ္ပါယ်နှင့် အသုံးပြုမှု
လုပ်ဆောင်ချက်-available() လုပ်ဆောင်ချက်သည် XSLT ပရိုဆက်ဆာက သတ်မှတ်ထားသည့် လုပ်ဆောင်ချက်ကို ပံ့ပိုးထားခြင်းရှိမရှိ ညွှန်ပြသည့် Boolean တန်ဖိုးကို ပြန်ပေးသည်။
သင်သည် XSLT လုပ်ဆောင်ချက်များနှင့် အမွေဆက်ခံထားသော XPath လုပ်ဆောင်ချက်များကို စမ်းသပ်နိုင်သည်။
အထားအသို
boolean function-available(string)
ကန့်သတ်ချက်များ
Parameter | Description |
---|---|
string | Required. Specifies the function to test |
ဥပမာ ၁
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<xsl:choose>
<xsl:when test="function-available('sum')">
<p>sum() is supported.</p>
</xsl:when>
<xsl:otherwise>
<p>sum() is not supported.</p>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="function-available('current')">
<p>current() is supported.</p>
</xsl:when>
<xsl:otherwise>
<p>current() is not supported.</p>
</xsl:otherwise>
</xsl:choose>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
XSL ဖိုင်ကို ကြည့်
ရှုပြီး ရလဒ်ကို ကြည့်ရှုပါ။
❮ XSLT လုပ်ဆောင်ချက် အကိုးအကား