XSLT function-available() ফাংশন

সংজ্ঞা ও ব্যবহার

function-available() ফাংশন একটি বল্টিয়ান ভালো ফলাফল ফিরায়, যা ইঙ্গিত করে যে এক্সস্ল প্রক্রিয়াকরণ যন্ত্র নির্দিষ্ট ফাংশনটি সমর্থিত করে কিনা。

আপনি XSLT ফাংশন এবং উত্তরসূরী XPath ফাংশন পরীক্ষা করতে পারেন。

সংজ্ঞা

boolean function-available(string)

পারামিটার

পারামিটার বর্ণনা
string অপরিহার্য। পরীক্ষা করা হওয়া ফাংশন নির্দিষ্ট করুন。

উদাহরণ

<?xml version="1.0" encoding="ISO-8859-1"?>
<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() সমর্থিত。</p>
</xsl:when>
<xsl:otherwise>
<p>sum() সমর্থিত নয়。</p>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="function-available('current')">
<p>current() সমর্থিত。</p>
</xsl:when>
<xsl:otherwise>
<p>current() is not supported.</p>
</xsl:otherwise>
</xsl:choose>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

查看 XSL 文件查看结果