šablona/stránka.xsl
author František Kučera <franta-hg@frantovo.cz>
Sat, 07 Jan 2012 20:22:44 +0100
changeset 73 962158184476
parent 61 9503eb8377f1
child 77 2f11f0ba6f13
permissions -rw-r--r--
Added tag v0.2 for changeset 5be21d1ef5f8
franta-hg@1
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@61
     2
<!--
franta-hg@61
     3
XML Web generátor – program na generování webových stránek
franta-hg@61
     4
Copyright © 2012 František Kučera (frantovo.cz)
franta-hg@61
     5
franta-hg@61
     6
This program is free software: you can redistribute it and/or modify
franta-hg@61
     7
it under the terms of the GNU General Public License as published by
franta-hg@61
     8
the Free Software Foundation, either version 3 of the License, or
franta-hg@61
     9
(at your option) any later version.
franta-hg@61
    10
franta-hg@61
    11
This program is distributed in the hope that it will be useful,
franta-hg@61
    12
but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@61
    13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
franta-hg@61
    14
GNU General Public License for more details.
franta-hg@61
    15
franta-hg@61
    16
You should have received a copy of the GNU General Public License
franta-hg@61
    17
along with this program.  If not, see <http://www.gnu.org/licenses/>.
franta-hg@61
    18
-->
franta-hg@1
    19
<xsl:stylesheet version="2.0"
franta-hg@1
    20
	xmlns="http://www.w3.org/1999/xhtml"
franta-hg@2
    21
	xmlns:h="http://www.w3.org/1999/xhtml"
franta-hg@18
    22
	xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
franta-hg@18
    23
	xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace"
franta-hg@17
    24
	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
franta-hg@27
    25
	xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce"
franta-hg@2
    26
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
franta-hg@2
    27
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
franta-hg@5
    28
	xmlns:svg="http://www.w3.org/2000/svg"
franta-hg@15
    29
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
franta-hg@27
    30
	exclude-result-prefixes="fn h s k m j xs">
franta-hg@2
    31
	<xsl:output 
franta-hg@2
    32
		method="xml" 
franta-hg@2
    33
		indent="yes" 
franta-hg@2
    34
		encoding="UTF-8"		
franta-hg@2
    35
		doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" 
franta-hg@2
    36
		doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/>
franta-hg@51
    37
	<xsl:include href="stránka-společné.xsl"/>
franta-hg@1
    38
	
franta-hg@51
    39
	<!-- 
franta-hg@51
    40
		Šablona stránky
franta-hg@51
    41
		***************
franta-hg@51
    42
	-->
franta-hg@1
    43
	<xsl:template match="/">
franta-hg@1
    44
		<html>
franta-hg@1
    45
			<head>
franta-hg@16
    46
				<xsl:if test="$podporaZaostalýchProhlížečů">
franta-hg@16
    47
					<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
franta-hg@16
    48
				</xsl:if>
franta-hg@18
    49
				<title><xsl:value-of select="s:stránka/s:nadpis"/></title>
franta-hg@8
    50
				<link title="Novinky (Atom)" href="atom.xml" type="application/atom+xml" rel="alternate"/>
franta-hg@10
    51
				<link title="Novinky (RSS)"  href="rss.xml"  type="application/rss+xml"  rel="alternate"/>
franta-hg@18
    52
				<xsl:apply-templates select="$konfigurace/k:web/k:js"/>
franta-hg@51
    53
				<xsl:apply-templates select="$konfigurace/k:web/k:css"/>
franta-hg@1
    54
			</head>
franta-hg@1
    55
			<body>
franta-hg@12
    56
				<div id="tělo">
franta-hg@12
    57
					<div id="záhlaví">
franta-hg@18
    58
						<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'záhlaví', $vsuvkováPřípona)))/s:stránka/h:text/node()"/>
franta-hg@12
    59
					</div>
franta-hg@12
    60
					<div id="vnitřek">
franta-hg@18
    61
						<h1><xsl:value-of select="s:stránka/s:nadpis"/></h1>
franta-hg@12
    62
						<ul id="nabídka">
franta-hg@20
    63
							<xsl:for-each select="collection(concat('./', $vstup ,'/?select=*', $vstupníPřípona))[s:stránka/s:pořadí]">
franta-hg@18
    64
								<xsl:sort select="empty(./s:stránka/s:pořadí)"/>
franta-hg@18
    65
								<xsl:sort select="./s:stránka/s:pořadí"/>
franta-hg@12
    66
								<li>
franta-hg@12
    67
									<xsl:variable name="xmlSoubor" select="tokenize(document-uri(.), '/')[last()]"/>
franta-hg@15
    68
									<xsl:variable name="xhtmlSoubor" select="replace($xmlSoubor, $vstupníPřípona, $výstupníPřípona)"/>
franta-hg@18
    69
									<a href="{fn:encode-for-uri($xhtmlSoubor)}"><xsl:value-of select="./s:stránka/s:nadpis"/></a>
franta-hg@12
    70
								</li>
franta-hg@12
    71
							</xsl:for-each>
franta-hg@12
    72
						</ul>
franta-hg@12
    73
						<div id="text">
franta-hg@18
    74
							<xsl:apply-templates select="s:stránka/h:text/node()"/>
franta-hg@12
    75
						</div>
franta-hg@12
    76
					</div>
franta-hg@12
    77
					<div id="zápatí">
franta-hg@18
    78
						<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'zápatí', $vsuvkováPřípona)))/s:stránka/h:text/node()"/>
franta-hg@12
    79
					</div>
franta-hg@12
    80
				</div>
franta-hg@1
    81
			</body>
franta-hg@1
    82
		</html>
franta-hg@1
    83
	</xsl:template>
franta-hg@10
    84
    
franta-hg@1
    85
</xsl:stylesheet>