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