templates/common.xsl
author František Kučera <franta-hg@frantovo.cz>
Fri, 04 Oct 2019 19:40:40 +0200
branchv_0
changeset 49 1dc027689f93
parent 47 templates/ssm.xhtml.xsl@7e665331bc32
child 51 21dfb69028a0
permissions -rw-r--r--
print version from Mercurial

<?xml version="1.0" encoding="UTF-8"?>
<!--
	Sane Software Manifesto helper tools
	Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, version 3.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program.  If not, see <https://www.gnu.org/licenses/>.
-->
<xsl:stylesheet 
	version="1.0"
	xmlns:m="tag:globalcode.info,2019:sane-software/manifesto"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	exclude-result-prefixes="fn m xs">
		
	<xsl:template name="version">
		<xsl:param name="tag"/>
		<xsl:param name="distance"/>
		<xsl:param name="hash"/>
		
		<xsl:value-of select="$tag"/>
		<xsl:if test="$distance &gt; 1">
			<xsl:text>+</xsl:text>
			<xsl:value-of select="$distance - 1"/>
			<xsl:text> (</xsl:text>
			<xsl:value-of select="$hash"/>
			<xsl:text>)</xsl:text>
		</xsl:if>
	</xsl:template>

</xsl:stylesheet>