[1] | 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 | --> |
---|
[1] | 19 | <xsl:stylesheet version="2.0" |
---|
| 20 | xmlns="http://www.w3.org/1999/xhtml" |
---|
[2] | 21 | xmlns:h="http://www.w3.org/1999/xhtml" |
---|
[18] | 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" |
---|
[17] | 24 | xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro" |
---|
[27] | 25 | xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce" |
---|
[2] | 26 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
---|
| 27 | xmlns:fn="http://www.w3.org/2005/xpath-functions" |
---|
[5] | 28 | xmlns:svg="http://www.w3.org/2000/svg" |
---|
[15] | 29 | xmlns:xs="http://www.w3.org/2001/XMLSchema" |
---|
[27] | 30 | exclude-result-prefixes="fn h s k m j xs"> |
---|
[2] | 31 | <xsl:output |
---|
| 32 | method="xml" |
---|
| 33 | indent="yes" |
---|
| 34 | encoding="UTF-8" |
---|
| 35 | doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" |
---|
| 36 | doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/> |
---|
[51] | 37 | <xsl:include href="stránka-společné.xsl"/> |
---|
[1] | 38 | |
---|
[51] | 39 | <!-- |
---|
| 40 | Šablona stránky |
---|
| 41 | *************** |
---|
| 42 | --> |
---|
[1] | 43 | <xsl:template match="/"> |
---|
| 44 | <html> |
---|
| 45 | <head> |
---|
[16] | 46 | <xsl:if test="$podporaZaostalýchProhlížečů"> |
---|
| 47 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> |
---|
| 48 | </xsl:if> |
---|
[18] | 49 | <title><xsl:value-of select="s:stránka/s:nadpis"/></title> |
---|
[8] | 50 | <link title="Novinky (Atom)" href="atom.xml" type="application/atom+xml" rel="alternate"/> |
---|
[10] | 51 | <link title="Novinky (RSS)" href="rss.xml" type="application/rss+xml" rel="alternate"/> |
---|
[18] | 52 | <xsl:apply-templates select="$konfigurace/k:web/k:js"/> |
---|
[51] | 53 | <xsl:apply-templates select="$konfigurace/k:web/k:css"/> |
---|
[1] | 54 | </head> |
---|
| 55 | <body> |
---|
[12] | 56 | <div id="tělo"> |
---|
| 57 | <div id="záhlaví"> |
---|
[18] | 58 | <xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'záhlaví', $vsuvkováPřípona)))/s:stránka/h:text/node()"/> |
---|
[12] | 59 | </div> |
---|
| 60 | <div id="vnitřek"> |
---|
[18] | 61 | <h1><xsl:value-of select="s:stránka/s:nadpis"/></h1> |
---|
[12] | 62 | <ul id="nabídka"> |
---|
[20] | 63 | <xsl:for-each select="collection(concat('./', $vstup ,'/?select=*', $vstupníPřípona))[s:stránka/s:pořadí]"> |
---|
[18] | 64 | <xsl:sort select="empty(./s:stránka/s:pořadí)"/> |
---|
| 65 | <xsl:sort select="./s:stránka/s:pořadí"/> |
---|
[12] | 66 | <li> |
---|
| 67 | <xsl:variable name="xmlSoubor" select="tokenize(document-uri(.), '/')[last()]"/> |
---|
[15] | 68 | <xsl:variable name="xhtmlSoubor" select="replace($xmlSoubor, $vstupníPřípona, $výstupníPřípona)"/> |
---|
[18] | 69 | <a href="{fn:encode-for-uri($xhtmlSoubor)}"><xsl:value-of select="./s:stránka/s:nadpis"/></a> |
---|
[12] | 70 | </li> |
---|
| 71 | </xsl:for-each> |
---|
| 72 | </ul> |
---|
| 73 | <div id="text"> |
---|
[18] | 74 | <xsl:apply-templates select="s:stránka/h:text/node()"/> |
---|
[12] | 75 | </div> |
---|
| 76 | </div> |
---|
| 77 | <div id="zápatí"> |
---|
[18] | 78 | <xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'zápatí', $vsuvkováPřípona)))/s:stránka/h:text/node()"/> |
---|
[12] | 79 | </div> |
---|
| 80 | </div> |
---|
[1] | 81 | </body> |
---|
| 82 | </html> |
---|
| 83 | </xsl:template> |
---|
[10] | 84 | |
---|
[1] | 85 | </xsl:stylesheet> |
---|