[51] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
[61] | 2 | <!-- |
---|
| 3 | XML Web generátor – program na generování webových stránek |
---|
| 4 | Copyright © 2012 František Kučera (frantovo.cz) |
---|
| 5 | |
---|
| 6 | This program is free software: you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation, either version 3 of the License, or |
---|
| 9 | (at your option) any later version. |
---|
| 10 | |
---|
| 11 | This program is distributed in the hope that it will be useful, |
---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 14 | GNU General Public License for more details. |
---|
| 15 | |
---|
| 16 | You should have received a copy of the GNU General Public License |
---|
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
| 18 | --> |
---|
[51] | 19 | <xsl:stylesheet version="2.0" |
---|
| 20 | xmlns="http://www.w3.org/1999/xhtml" |
---|
| 21 | xmlns:h="http://www.w3.org/1999/xhtml" |
---|
| 22 | xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana" |
---|
| 23 | xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace" |
---|
| 24 | xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro" |
---|
| 25 | xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce" |
---|
| 26 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
---|
| 27 | xmlns:fn="http://www.w3.org/2005/xpath-functions" |
---|
| 28 | xmlns:svg="http://www.w3.org/2000/svg" |
---|
| 29 | xmlns:xs="http://www.w3.org/2001/XMLSchema" |
---|
| 30 | exclude-result-prefixes="fn h s k m j xs"> |
---|
| 31 | |
---|
| 32 | <xsl:param name="vstup" select="'../vstup/'"/> |
---|
| 33 | <xsl:param name="výstup" select="'../výstup/'"/> |
---|
| 34 | <xsl:param name="vstupníPřípona" select="'.xml'"/> |
---|
| 35 | <xsl:param name="výstupníPřípona" select="'.xhtml'"/> |
---|
| 36 | <xsl:param name="vsuvkováPřípona" select="'.inc'"/> |
---|
| 37 | <xsl:param name="podporaZaostalýchProhlížečů" select="false()" as="xs:boolean"/> |
---|
| 38 | |
---|
| 39 | <xsl:variable name="konfigurace" select="document(concat($vstup, 'web.conf'))"/> |
---|
| 40 | |
---|
| 41 | <xsl:include href=".makra-seznam.xsl"/> |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | <!-- Kopírujeme elementy, ale vynecháme nepoužité xmlns deklarace: --> |
---|
| 45 | <xsl:template match="*"> |
---|
| 46 | <xsl:element name="{name()}"> |
---|
| 47 | <xsl:copy-of select="@*"/> |
---|
| 48 | <xsl:apply-templates/> |
---|
| 49 | </xsl:element> |
---|
| 50 | </xsl:template> |
---|
| 51 | |
---|
| 52 | <!-- Varování pro případ, že jsme v režimu podpory pro zaostalé prohlížeče --> |
---|
| 53 | <xsl:template name="varováníRetardace"> |
---|
| 54 | <xsl:if test="$podporaZaostalýchProhlížečů"> |
---|
| 55 | <xsl:comment> |
---|
| 56 | Generátor byl spuštěn v režimu podpory zaostalých prohlížečů. |
---|
| 57 | Uživatelům doporučujeme upgrade na skutečný WWW prohlížeč, |
---|
| 58 | jako je např. Firefox nebo Chromium (případně Opera či Safari). |
---|
| 59 | </xsl:comment> |
---|
| 60 | </xsl:if> |
---|
| 61 | </xsl:template> |
---|
| 62 | |
---|
| 63 | <!-- Odkazy na JavaScript a kaskádové styly --> |
---|
| 64 | <xsl:template match="k:web/k:js"> |
---|
| 65 | <script src="{text()}" type="text/javascript"> |
---|
| 66 | <xsl:call-template name="varováníRetardace"/> |
---|
| 67 | </script> |
---|
| 68 | </xsl:template> |
---|
| 69 | <xsl:template match="k:web/k:css"> |
---|
| 70 | <link href="{text()}" type="text/css" rel="StyleSheet" /> |
---|
| 71 | </xsl:template> |
---|
| 72 | |
---|
| 73 | </xsl:stylesheet> |
---|