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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
<!--
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
	Sane Software Manifesto helper tools
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
	Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info)
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
    This program is free software: you can redistribute it and/or modify
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
    it under the terms of the GNU General Public License as published by
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
    the Free Software Foundation, version 3.
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
    This program is distributed in the hope that it will be useful,
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
    GNU General Public License for more details.
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
	You should have received a copy of the GNU General Public License
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
	along with this program.  If not, see <https://www.gnu.org/licenses/>.
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
-->
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
<xsl:stylesheet 
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
	version="1.0"
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
	xmlns:m="tag:globalcode.info,2019:sane-software/manifesto"
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
49
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    24
	exclude-result-prefixes="fn m xs">
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    25
		
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    26
	<xsl:template name="version">
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    27
		<xsl:param name="tag"/>
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    28
		<xsl:param name="distance"/>
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    29
		<xsl:param name="hash"/>
15
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
		
49
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    31
		<xsl:value-of select="$tag"/>
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    32
		<xsl:if test="$distance &gt; 1">
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    33
			<xsl:text>+</xsl:text>
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    34
			<xsl:value-of select="$distance - 1"/>
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    35
			<xsl:text> (</xsl:text>
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    36
			<xsl:value-of select="$hash"/>
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    37
			<xsl:text>)</xsl:text>
1dc027689f93 print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents: 47
diff changeset
    38
		</xsl:if>
15
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
	</xsl:template>
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
96fc2f42b1e1 conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
</xsl:stylesheet>