XSLT function-available() ఫంక్షన్
నిర్వచనం మరియు వినియోగం
function-available() ఫంక్షన్ ఒక బుల్ విలువను తిరిగి ఇస్తుంది, దానిలో సూచించిన ఫంక్షన్ ను XSLT ప్రాసెసర్ మద్దతు అవుతుంది లేదా లేదు.
మీరు XSLT ఫంక్షన్స్ మరియు ఉత్తరాంతరమైన XPath ఫంక్షన్స్ ని పరీక్షించవచ్చు.
వినియోగం
boolean function-available(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>