šablona/stránka.xsl
author František Kučera <franta-hg@frantovo.cz>
Sat Apr 02 23:54:23 2011 +0200 (2011-04-02)
changeset 2 ab9099ff88fa
parent 1 a05c6f3cbc3e
child 3 1529a89b61a5
permissions -rw-r--r--
vkládání zápatí, jmenné prostory, saxon
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@2
     5
	xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
franta-hg@2
     6
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
franta-hg@2
     7
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
franta-hg@2
     8
	exclude-result-prefixes="fn h g">
franta-hg@2
     9
	<xsl:output 
franta-hg@2
    10
		method="xml" 
franta-hg@2
    11
		indent="yes" 
franta-hg@2
    12
		encoding="UTF-8"		
franta-hg@2
    13
		doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" 
franta-hg@2
    14
		doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/>
franta-hg@2
    15
		
franta-hg@1
    16
	
franta-hg@1
    17
	<xsl:template match="/">
franta-hg@1
    18
		<html>
franta-hg@1
    19
			<head>
franta-hg@2
    20
				<title><xsl:value-of select="g:stránka/g:nadpis"/></title>				
franta-hg@1
    21
			</head>
franta-hg@1
    22
			<body>
franta-hg@2
    23
				<h1><xsl:value-of select="g:stránka/g:nadpis"/></h1>				
franta-hg@1
    24
			
franta-hg@2
    25
				<!-- Vložíme obsah stránky: -->				
franta-hg@2
    26
				<xsl:apply-templates select="g:stránka/h:text/node()"/>
franta-hg@2
    27
				
franta-hg@2
    28
				<!-- Vložíme zápatí: -->
franta-hg@2
    29
				<xsl:apply-templates select="document(fn:encode-for-uri('../vstup/zápatí.inc'))/g:stránka/h:text/node()"/>
franta-hg@2
    30
				
franta-hg@1
    31
			</body>
franta-hg@1
    32
		</html>
franta-hg@1
    33
	</xsl:template>
franta-hg@1
    34
	
franta-hg@1
    35
	<xsl:template match="node()|@*">
franta-hg@2
    36
		<xsl:copy>
franta-hg@2
    37
			<xsl:apply-templates select="node()|@*"/>
franta-hg@2
    38
		</xsl:copy>
franta-hg@2
    39
	</xsl:template>
franta-hg@1
    40
franta-hg@1
    41
</xsl:stylesheet>