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