XSLT function-available() ఫంక్షన్
నిర్వచనం మరియు ఉపయోగం
function-available() ఫంక్షన్ ఒక బుల్లెన్ విలువను తిరిగి ఇస్తుంది, దానిలో ప్రత్యేకంగా నిర్వచించిన ఫంక్షన్ ను XSLT ప్రాసెసర్ మద్దతు చేస్తారా లేదా లేదు తెలుపుతుంది.
మీరు XSLT ఫంక్షన్స్ మరియు ఉత్తరాధికారిత వాల్పాక్స్ ఫంక్షన్స్ ని పరీక్షించవచ్చు.
సంకేతం
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() మద్దతు లేదు.</p> </xsl:otherwise> </xsl:choose> </body> </html> </xsl:template> </xsl:stylesheet>