author | František Kučera <franta-hg@frantovo.cz> |
Wed, 08 May 2024 22:21:24 +0200 | |
branch | v_0 |
changeset 78 | b877c9f81953 |
parent 51 | 21dfb69028a0 |
permissions | -rw-r--r-- |
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 |
<!-- |
51
21dfb69028a0
name: Sane software manifesto (lower case)
František Kučera <franta-hg@frantovo.cz>
parents:
49
diff
changeset
|
3 |
Sane software manifesto helper tools |
15
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"/> |
51
21dfb69028a0
name: Sane software manifesto (lower case)
František Kučera <franta-hg@frantovo.cz>
parents:
49
diff
changeset
|
30 |
<xsl:param name="changedFiles"/> |
15
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
31 |
|
49
1dc027689f93
print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents:
47
diff
changeset
|
32 |
<xsl:value-of select="$tag"/> |
51
21dfb69028a0
name: Sane software manifesto (lower case)
František Kučera <franta-hg@frantovo.cz>
parents:
49
diff
changeset
|
33 |
<xsl:if test="$distance > 1 or $changedFiles > 0"> |
49
1dc027689f93
print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents:
47
diff
changeset
|
34 |
<xsl:text>+</xsl:text> |
1dc027689f93
print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents:
47
diff
changeset
|
35 |
<xsl:value-of select="$distance - 1"/> |
1dc027689f93
print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents:
47
diff
changeset
|
36 |
<xsl:text> (</xsl:text> |
1dc027689f93
print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents:
47
diff
changeset
|
37 |
<xsl:value-of select="$hash"/> |
51
21dfb69028a0
name: Sane software manifesto (lower case)
František Kučera <franta-hg@frantovo.cz>
parents:
49
diff
changeset
|
38 |
<xsl:if test="$changedFiles > 0"> |
21dfb69028a0
name: Sane software manifesto (lower case)
František Kučera <franta-hg@frantovo.cz>
parents:
49
diff
changeset
|
39 |
<xsl:text>+</xsl:text> |
21dfb69028a0
name: Sane software manifesto (lower case)
František Kučera <franta-hg@frantovo.cz>
parents:
49
diff
changeset
|
40 |
<xsl:value-of select="$changedFiles"/> |
21dfb69028a0
name: Sane software manifesto (lower case)
František Kučera <franta-hg@frantovo.cz>
parents:
49
diff
changeset
|
41 |
</xsl:if> |
49
1dc027689f93
print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents:
47
diff
changeset
|
42 |
<xsl:text>)</xsl:text> |
1dc027689f93
print version from Mercurial
František Kučera <franta-hg@frantovo.cz>
parents:
47
diff
changeset
|
43 |
</xsl:if> |
15
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
44 |
</xsl:template> |
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
45 |
|
96fc2f42b1e1
conversion to XML format, XSD, XSLT
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
46 |
</xsl:stylesheet> |