šablona/stránka.xsl
changeset 12 3719b121c3c4
parent 11 78a8dd1eeb2b
child 15 cfb2fc0ca242
equal deleted inserted replaced
11:78a8dd1eeb2b 12:3719b121c3c4
    27 				<link title="Novinky (RSS)"  href="rss.xml"  type="application/rss+xml"  rel="alternate"/>
    27 				<link title="Novinky (RSS)"  href="rss.xml"  type="application/rss+xml"  rel="alternate"/>
    28 				<xsl:apply-templates select="$konfigurace/g:web/g:js"/>
    28 				<xsl:apply-templates select="$konfigurace/g:web/g:js"/>
    29 				<xsl:apply-templates select="$konfigurace/g:web/g:css"/>				
    29 				<xsl:apply-templates select="$konfigurace/g:web/g:css"/>				
    30 			</head>
    30 			</head>
    31 			<body>
    31 			<body>
    32 				<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'záhlaví.inc')))/g:stránka/h:text/node()"/>			
    32 				<div id="tělo">
    33 				<h1><xsl:value-of select="g:stránka/g:nadpis"/></h1>
    33 					<div id="záhlaví">
    34 				<xsl:apply-templates select="g:stránka/h:text/node()"/>
    34 						<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'záhlaví.inc')))/g:stránka/h:text/node()"/>
    35 				<ul id="nabídka">
    35 					</div>
    36 					<xsl:for-each select="collection('../vstup/?select=*.xml')[g:stránka/g:pořadí]">
    36 					<div id="vnitřek">
    37 						<xsl:sort select="empty(./g:stránka/g:pořadí)"/>
    37 						<h1><xsl:value-of select="g:stránka/g:nadpis"/></h1>
    38 						<xsl:sort select="./g:stránka/g:pořadí"/>
    38 						<ul id="nabídka">
    39 						<li>
    39 							<xsl:for-each select="collection('../vstup/?select=*.xml')[g:stránka/g:pořadí]">
    40 							<xsl:variable name="xmlSoubor" select="tokenize(document-uri(.), '/')[last()]"/>
    40 								<xsl:sort select="empty(./g:stránka/g:pořadí)"/>
    41 							<xsl:variable name="xhtmlSoubor" select="replace($xmlSoubor, '.xml', '.xhtml')"/>
    41 								<xsl:sort select="./g:stránka/g:pořadí"/>
    42 							<a href="{fn:encode-for-uri($xhtmlSoubor)}"><xsl:value-of select="./g:stránka/g:nadpis"/></a>
    42 								<li>
    43 						</li>
    43 									<xsl:variable name="xmlSoubor" select="tokenize(document-uri(.), '/')[last()]"/>
    44 					</xsl:for-each>
    44 									<xsl:variable name="xhtmlSoubor" select="replace($xmlSoubor, '.xml', '.xhtml')"/>
    45 				</ul>
    45 									<a href="{fn:encode-for-uri($xhtmlSoubor)}"><xsl:value-of select="./g:stránka/g:nadpis"/></a>
    46 				<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'zápatí.inc')))/g:stránka/h:text/node()"/>				
    46 								</li>
       
    47 							</xsl:for-each>
       
    48 						</ul>
       
    49 						<div id="text">
       
    50 							<xsl:apply-templates select="g:stránka/h:text/node()"/>
       
    51 						</div>
       
    52 					</div>
       
    53 					<div id="zápatí">
       
    54 						<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'zápatí.inc')))/g:stránka/h:text/node()"/>
       
    55 					</div>
       
    56 				</div>
    47 			</body>
    57 			</body>
    48 		</html>
    58 		</html>
    49 	</xsl:template>
    59 	</xsl:template>
    50 	
    60 	
    51 	<!-- Kopírujeme elementy, ale vynecháme nepoužité xmlns deklarace: -->
    61 	<!-- Kopírujeme elementy, ale vynecháme nepoužité xmlns deklarace: -->