ukázka/makra/hg-verze.xsl
author František Kučera <franta-hg@frantovo.cz>
Sun, 23 Jun 2013 14:05:20 +0200
changeset 124 42aec5217cbf
parent 120 4d33f14e99dd
permissions -rw-r--r--
název webu v titulku stránky
franta-hg@107
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@107
     2
<xsl:stylesheet version="2.0"
franta-hg@107
     3
	xmlns="http://www.w3.org/1999/xhtml"
franta-hg@107
     4
	xmlns:h="http://www.w3.org/1999/xhtml"
franta-hg@107
     5
	xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
franta-hg@107
     6
	xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace"
franta-hg@107
     7
	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
franta-hg@107
     8
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
franta-hg@107
     9
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
franta-hg@107
    10
	xmlns:svg="http://www.w3.org/2000/svg"
franta-hg@107
    11
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
franta-hg@107
    12
	exclude-result-prefixes="fn h s k m xs">
franta-hg@108
    13
	
franta-hg@107
    14
	<!-- Vypíše verze z verzovacího systému: -->
franta-hg@107
    15
	<xsl:template match="m:hg-verze">
franta-hg@108
    16
franta-hg@107
    17
		<xsl:variable name="zadáníSkriptu">
franta-hg@108
    18
			<m:skript jazyk="bash" výstup="xml">hg log --style xml</m:skript>
franta-hg@107
    19
		</xsl:variable>
franta-hg@107
    20
franta-hg@107
    21
		<xsl:variable name="výstupSkriptu">
franta-hg@107
    22
			<xsl:apply-templates select="$zadáníSkriptu/*"/>
franta-hg@107
    23
		</xsl:variable>
franta-hg@107
    24
franta-hg@107
    25
		<table>
franta-hg@107
    26
			<thead>
franta-hg@107
    27
				<tr>
franta-hg@107
    28
					<td>Číslo verze</td>
franta-hg@107
    29
					<td>Datum vydání</td>
franta-hg@107
    30
				</tr>
franta-hg@107
    31
			</thead>
franta-hg@107
    32
			<tbody style="text-align: right;">
franta-hg@107
    33
				<xsl:for-each select="$výstupSkriptu/h:log/h:logentry[h:tag[starts-with(text(), 'v')]]">
franta-hg@107
    34
					<tr>
franta-hg@107
    35
						<td><xsl:value-of select="substring(h:tag/text(), 2)"/></td>
franta-hg@107
    36
						<td><xsl:value-of select="format-dateTime(h:date, '[D]. [M]. [Y0001]')"/></td>
franta-hg@107
    37
					</tr>
franta-hg@107
    38
				</xsl:for-each>
franta-hg@107
    39
			</tbody>
franta-hg@107
    40
		</table>
franta-hg@107
    41
	</xsl:template>
franta-hg@107
    42
franta-hg@107
    43
</xsl:stylesheet>
franta-hg@107
    44