vstup/makra/hg-verze.xsl
author František Kučera <franta-hg@frantovo.cz>
Thu, 05 Jul 2012 20:13:56 +0200
changeset 108 8d9cab64c335
parent 107 379a2a893fd1
permissions -rw-r--r--
#20 Skriptování: výstupní formáty: text (prostý), xhtml (fragment), xml (celý dokument, může mít XML deklaraci).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
107
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
<xsl:stylesheet version="2.0"
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
	xmlns="http://www.w3.org/1999/xhtml"
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
	xmlns:h="http://www.w3.org/1999/xhtml"
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
	xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
	xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace"
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
	xmlns:svg="http://www.w3.org/2000/svg"
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
	exclude-result-prefixes="fn h s k m xs">
108
8d9cab64c335 #20 Skriptování: výstupní formáty: text (prostý), xhtml (fragment), xml (celý dokument, může mít XML deklaraci).
František Kučera <franta-hg@frantovo.cz>
parents: 107
diff changeset
    13
	
107
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
	<!-- Vypíše verze z verzovacího systému: -->
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
	<xsl:template match="m:hg-verze">
108
8d9cab64c335 #20 Skriptování: výstupní formáty: text (prostý), xhtml (fragment), xml (celý dokument, může mít XML deklaraci).
František Kučera <franta-hg@frantovo.cz>
parents: 107
diff changeset
    16
107
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
		<xsl:variable name="zadáníSkriptu">
108
8d9cab64c335 #20 Skriptování: výstupní formáty: text (prostý), xhtml (fragment), xml (celý dokument, může mít XML deklaraci).
František Kučera <franta-hg@frantovo.cz>
parents: 107
diff changeset
    18
			<m:skript jazyk="bash" výstup="xml">hg log --style xml</m:skript>
107
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
		</xsl:variable>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
		<xsl:variable name="výstupSkriptu">
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
			<xsl:apply-templates select="$zadáníSkriptu/*"/>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
		</xsl:variable>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
		<table>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
			<thead>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
				<tr>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
					<td>Číslo verze</td>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
					<td>Datum vydání</td>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
				</tr>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
			</thead>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
			<tbody style="text-align: right;">
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
				<xsl:for-each select="$výstupSkriptu/h:log/h:logentry[h:tag[starts-with(text(), 'v')]]">
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
					<tr>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
						<td><xsl:value-of select="substring(h:tag/text(), 2)"/></td>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
						<td><xsl:value-of select="format-dateTime(h:date, '[D]. [M]. [Y0001]')"/></td>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
					</tr>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
				</xsl:for-each>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
			</tbody>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
		</table>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
	</xsl:template>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    43
</xsl:stylesheet>
379a2a893fd1 #20 Skriptování: Makra ve skriptech a Skripty v makrech + výpis verzí z Mercurialu.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    44