Revision 108:8d9cab64c335, 1.4 KB
(checked in by František Kučera <franta-hg@…>, 12 years ago)
|
#20 Skriptování: výstupní formáty: text (prostý), xhtml (fragment), xml (celý dokument, může mít XML deklaraci).
|
Rev | Line | |
---|
[107] | 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"> |
---|
[108] | 13 | |
---|
[107] | 14 | <!-- Vypíše verze z verzovacího systému: --> |
---|
| 15 | <xsl:template match="m:hg-verze"> |
---|
[108] | 16 | |
---|
[107] | 17 | <xsl:variable name="zadáníSkriptu"> |
---|
[108] | 18 | <m:skript jazyk="bash" výstup="xml">hg log --style xml</m:skript> |
---|
[107] | 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 | |
---|