function-available()
XSLT function-available() funksiyasi
❮ XSLT funksiyalar ma’lumotnomasiTa’rif va qo‘llanilishi
function-available() funksiyasi ko‘rsatilgan funksiya XSLT protsessori tomonidan qo‘llab-quvvatlanishi yoki qo‘llab-quvvatlanmasligini bildiruvchi Boolean qiymat qaytaradi.
XSLT funksiyalarini va meros qilib olingan XPath funksiyalarini tekshirishingiz mumkin.
Sintaksis
boolean function-available(string)Parametrlar
| Parametr | Tavsif |
|---|---|
| string | Majburiy. Tekshiriladigan funksiyani belgilaydi |
1-misol
<?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 faylni ko‘rish va Natijani ko‘rish
❮ XSLT funksiyalar ma’lumotnomasi
W3Schools Pathfinder
Yutuqlaringizni kuzating – bu bepul!
