šablona/stránka.xsl
changeset 5 0a7c6c9357d3
parent 4 1bb39595a51c
child 6 801a8935caf7
equal deleted inserted replaced
4:1bb39595a51c 5:0a7c6c9357d3
     3 	xmlns="http://www.w3.org/1999/xhtml"
     3 	xmlns="http://www.w3.org/1999/xhtml"
     4 	xmlns:h="http://www.w3.org/1999/xhtml"
     4 	xmlns:h="http://www.w3.org/1999/xhtml"
     5 	xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
     5 	xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
     6 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     6 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     7 	xmlns:fn="http://www.w3.org/2005/xpath-functions"
     7 	xmlns:fn="http://www.w3.org/2005/xpath-functions"
       
     8 	xmlns:svg="http://www.w3.org/2000/svg"
     8 	exclude-result-prefixes="fn h g">
     9 	exclude-result-prefixes="fn h g">
     9 	<xsl:output 
    10 	<xsl:output 
    10 		method="xml" 
    11 		method="xml" 
    11 		indent="yes" 
    12 		indent="yes" 
    12 		encoding="UTF-8"		
    13 		encoding="UTF-8"		
    13 		doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" 
    14 		doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" 
    14 		doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/>
    15 		doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/>
    15 	
    16 	
       
    17 	<!-- Celý dokument: -->
    16 	<xsl:template match="/">
    18 	<xsl:template match="/">
    17 		<html>
    19 		<html>
    18 			<head>
    20 			<head>
    19 				<title><xsl:value-of select="g:stránka/g:nadpis"/></title>				
    21 				<title><xsl:value-of select="g:stránka/g:nadpis"/></title>				
    20 			</head>
    22 			</head>
    36 				<xsl:apply-templates select="document(fn:encode-for-uri('../vstup/zápatí.inc'))/g:stránka/h:text/node()"/>				
    38 				<xsl:apply-templates select="document(fn:encode-for-uri('../vstup/zápatí.inc'))/g:stránka/h:text/node()"/>				
    37 			</body>
    39 			</body>
    38 		</html>
    40 		</html>
    39 	</xsl:template>
    41 	</xsl:template>
    40 	
    42 	
    41 	<xsl:template match="node()|@*">
    43 	<!-- Kopírujeme elementy, ale vynecháme nepoužité xmlns deklarace: -->
    42 		<xsl:copy>
    44 	<xsl:template match="*">
    43 			<xsl:apply-templates select="node()|@*"/>
    45 		<xsl:element name="{name()}">
    44 		</xsl:copy>
    46 			<xsl:copy-of select="@*"/>
    45 	</xsl:template>
    47 			<xsl:apply-templates/>
       
    48 		</xsl:element>
       
    49     </xsl:template>
    46 
    50 
    47 </xsl:stylesheet>
    51 </xsl:stylesheet>