Blame doc/version-greater-or-equal.xsl
|
Packit Service |
6d40f9 |
|
|
Packit Service |
6d40f9 |
|
|
Packit Service |
6d40f9 |
version="1.0"
|
|
Packit Service |
6d40f9 |
xmlns="http://www.w3.org/TR/xhtml1/transitional"
|
|
Packit Service |
6d40f9 |
exclude-result-prefixes="#default">
|
|
Packit Service |
6d40f9 |
<xsl:template name="version-greater-or-equal">
|
|
Packit Service |
6d40f9 |
<xsl:param name="ver1"></xsl:param>
|
|
Packit Service |
6d40f9 |
<xsl:param name="ver2"></xsl:param>
|
|
Packit Service |
6d40f9 |
<xsl:variable name="vp1">
|
|
Packit Service |
6d40f9 |
<xsl:choose>
|
|
Packit Service |
6d40f9 |
<xsl:when test="contains($ver1, '.')">
|
|
Packit Service |
6d40f9 |
<xsl:value-of select="substring-before($ver1, '.')"/>
|
|
Packit Service |
6d40f9 |
</xsl:when>
|
|
Packit Service |
6d40f9 |
<xsl:otherwise>
|
|
Packit Service |
6d40f9 |
<xsl:value-of select="$ver1"/>
|
|
Packit Service |
6d40f9 |
</xsl:otherwise>
|
|
Packit Service |
6d40f9 |
</xsl:choose>
|
|
Packit Service |
6d40f9 |
</xsl:variable>
|
|
Packit Service |
6d40f9 |
<xsl:variable name="vp2">
|
|
Packit Service |
6d40f9 |
<xsl:choose>
|
|
Packit Service |
6d40f9 |
<xsl:when test="contains($ver2, '.')">
|
|
Packit Service |
6d40f9 |
<xsl:value-of select="substring-before($ver2, '.')"/>
|
|
Packit Service |
6d40f9 |
</xsl:when>
|
|
Packit Service |
6d40f9 |
<xsl:otherwise>
|
|
Packit Service |
6d40f9 |
<xsl:value-of select="$ver2"/>
|
|
Packit Service |
6d40f9 |
</xsl:otherwise>
|
|
Packit Service |
6d40f9 |
</xsl:choose>
|
|
Packit Service |
6d40f9 |
</xsl:variable>
|
|
Packit Service |
6d40f9 |
<xsl:choose>
|
|
Packit Service |
6d40f9 |
<xsl:when test="$vp1 > $vp2">
|
|
Packit Service |
6d40f9 |
1
|
|
Packit Service |
6d40f9 |
</xsl:when>
|
|
Packit Service |
6d40f9 |
<xsl:when test="$vp1 < $vp2">
|
|
Packit Service |
6d40f9 |
0
|
|
Packit Service |
6d40f9 |
</xsl:when>
|
|
Packit Service |
6d40f9 |
<xsl:when test="$vp1 = $vp2">
|
|
Packit Service |
6d40f9 |
<xsl:choose>
|
|
Packit Service |
6d40f9 |
<xsl:when test="contains($ver1, '.') and contains($ver2, '.')">
|
|
Packit Service |
6d40f9 |
<xsl:call-template name="version-greater-or-equal">
|
|
Packit Service |
6d40f9 |
<xsl:with-param name="ver1" select="substring-after($ver1, '.')"/>
|
|
Packit Service |
6d40f9 |
<xsl:with-param name="ver2" select="substring-after($ver2, '.')"/>
|
|
Packit Service |
6d40f9 |
</xsl:call-template>
|
|
Packit Service |
6d40f9 |
</xsl:when>
|
|
Packit Service |
6d40f9 |
<xsl:when test="contains($ver2, '.')">
|
|
Packit Service |
6d40f9 |
0
|
|
Packit Service |
6d40f9 |
</xsl:when>
|
|
Packit Service |
6d40f9 |
<xsl:otherwise>
|
|
Packit Service |
6d40f9 |
1
|
|
Packit Service |
6d40f9 |
</xsl:otherwise>
|
|
Packit Service |
6d40f9 |
</xsl:choose>
|
|
Packit Service |
6d40f9 |
</xsl:when>
|
|
Packit Service |
6d40f9 |
</xsl:choose>
|
|
Packit Service |
6d40f9 |
</xsl:template>
|
|
Packit Service |
6d40f9 |
</xsl:stylesheet>
|