XSLT file :
---------------------------------------------------
<?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)"> <!--'sum()' function is checking now-->
<p>Function is supported.</p>
</xsl:when>
<xsl:otherwise>
<p>Function is not supported.</p>
</xsl:otherwise>
</xsl:choose>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
----------------------------------------------------
if o/p is : Function is supported => means function supported by the xslt
---------------------------------------------------
<?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)"> <!--'sum()' function is checking now-->
<p>Function is supported.</p>
</xsl:when>
<xsl:otherwise>
<p>Function is not supported.</p>
</xsl:otherwise>
</xsl:choose>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
----------------------------------------------------
if o/p is : Function is supported => means function supported by the xslt
No comments:
Post a Comment