šablona/stránka.xsl
author František Kučera <franta-hg@frantovo.cz>
Thu, 11 Sep 2014 20:30:46 +0200
changeset 135 ad2c76125200
parent 132 1b16c8828fc0
child 136 d5feb9d8ebc3
permissions -rw-r--r--
hgignore: glob/regex
     1 <?xml version="1.0" encoding="UTF-8"?>
     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 -->
    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 	<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"/>
    37 	<xsl:include href="stránka-společné.xsl"/>
    38 	
    39 	<!-- 
    40 		Šablona stránky
    41 		***************
    42 	-->
    43 	<xsl:template match="/">
    44 		<html>
    45 			<head>
    46 				<xsl:if test="$podporaZaostalýchProhlížečů">
    47 					<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
    48 					<xsl:call-template name="varováníRetardaceDlouhé"/>
    49 				</xsl:if>
    50 				<title>
    51 					<xsl:choose>
    52 						<xsl:when test="s:stránka/s:nadpis/text() = $konfigurace/k:web/k:název/text()"><xsl:value-of select="s:stránka/s:nadpis"/></xsl:when>
    53 						<xsl:otherwise><xsl:value-of select="s:stránka/s:nadpis"/> – <xsl:value-of select="$konfigurace/k:web/k:název"/></xsl:otherwise>
    54 					</xsl:choose>
    55 				</title>
    56 				<link title="Novinky (Atom)" href="atom.xml" type="application/atom+xml" rel="alternate"/>
    57 				<link title="Novinky (RSS)"  href="rss.xml"  type="application/rss+xml"  rel="alternate"/>
    58 				<xsl:apply-templates select="$konfigurace/k:web/k:autor/k:jméno"/>
    59 				<xsl:apply-templates select="s:stránka/s:perex"/>
    60 				<xsl:apply-templates select="s:stránka/s:klíčováSlova"/>
    61 				<xsl:apply-templates select="$konfigurace/k:web/k:js"/>
    62 				<xsl:apply-templates select="$konfigurace/k:web/k:css"/>
    63 			</head>
    64 			<body>
    65 				<div id="tělo">
    66 					<xsl:call-template name="vložZáhlaví"/>
    67 					<div id="vnitřek">
    68 						<h1><xsl:value-of select="s:stránka/s:nadpis"/></h1>
    69 						<xsl:call-template name="vložNabídku"/>
    70 						<div id="text">
    71 							<xsl:apply-templates select="s:stránka/h:text/node()"/>
    72 						</div>
    73 					</div>
    74 					<xsl:call-template name="poznámkyPodČarou"/>
    75 					<xsl:call-template name="vložZápatí"/>
    76 				</div>
    77 			</body>
    78 		</html>
    79 	</xsl:template>
    80 
    81 </xsl:stylesheet>
    82