Project

Profile

Help

Bug #6498 » FunctionCompare.xslt

Adrian Bird, 2024-08-08 12:50

 
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my="my-ns">

<xsl:output method="text" />

<xsl:function name="my:compare" visibility="public">
<xsl:param name="param1" />
<xsl:param name="param2" />
<xsl:choose>
<xsl:when test="$param1 eq $param2">
<xsl:text>param1 same as param2</xsl:text>
</xsl:when>
<xsl:when test="$param1 gt $param2">
<xsl:text>param1 greater than param2</xsl:text>
</xsl:when>
<xsl:when test="$param1 lt $param2">
<xsl:text>param1 less than param2</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:function>
</xsl:stylesheet>
(3-3/3)