एक्सएसएलटी फ़ंक्शन-उपलब्ध () फ़ंक्शन
❮ एक्सएसएलटी फंक्शन संदर्भपरिभाषा और उपयोग
फ़ंक्शन-उपलब्ध () फ़ंक्शन एक बूलियन मान देता है जो इंगित करता है कि निर्दिष्ट फ़ंक्शन XSLT प्रोसेसर द्वारा समर्थित है या नहीं।
आप XSLT फ़ंक्शंस और इनहेरिट किए गए XPath फ़ंक्शंस का परीक्षण कर सकते हैं।
वाक्य - विन्यास
boolean function-available(string)
मापदंडों
Parameter | Description |
---|---|
string | Required. Specifies the function to test |
उदाहरण 1
<?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 फ़ाइल देखें और
परिणाम देखें
❮ एक्सएसएलटी फंक्शन संदर्भ