šablona/stránka.xsl
changeset 11 78a8dd1eeb2b
parent 10 4e70453a027f
child 12 3719b121c3c4
     1.1 --- a/šablona/stránka.xsl	Sun Apr 03 20:12:33 2011 +0200
     1.2 +++ b/šablona/stránka.xsl	Sun Apr 03 20:39:10 2011 +0200
     1.3 @@ -13,12 +13,13 @@
     1.4  		encoding="UTF-8"		
     1.5  		doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" 
     1.6  		doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/>
     1.7 -		
     1.8 -	<xsl:param name="konfigurák"/>
     1.9 +	
    1.10 +	<!-- Vstupní adresář: -->
    1.11 +	<xsl:param name="vstup" select="'../vstup/'"/>
    1.12  	
    1.13  	<!-- Celý dokument: -->
    1.14  	<xsl:template match="/">
    1.15 -		<xsl:variable name="konfigurace" select="document($konfigurák)"/>
    1.16 +		<xsl:variable name="konfigurace" select="document(concat($vstup, 'web.conf'))"/>
    1.17  		<html>
    1.18  			<head>
    1.19  				<title><xsl:value-of select="g:stránka/g:nadpis"/></title>
    1.20 @@ -28,7 +29,7 @@
    1.21  				<xsl:apply-templates select="$konfigurace/g:web/g:css"/>				
    1.22  			</head>
    1.23  			<body>
    1.24 -				<xsl:apply-templates select="document(fn:encode-for-uri('../vstup/záhlaví.inc'))/g:stránka/h:text/node()"/>			
    1.25 +				<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'záhlaví.inc')))/g:stránka/h:text/node()"/>			
    1.26  				<h1><xsl:value-of select="g:stránka/g:nadpis"/></h1>
    1.27  				<xsl:apply-templates select="g:stránka/h:text/node()"/>
    1.28  				<ul id="nabídka">
    1.29 @@ -42,7 +43,7 @@
    1.30  						</li>
    1.31  					</xsl:for-each>
    1.32  				</ul>
    1.33 -				<xsl:apply-templates select="document(fn:encode-for-uri('../vstup/zápatí.inc'))/g:stránka/h:text/node()"/>				
    1.34 +				<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'zápatí.inc')))/g:stránka/h:text/node()"/>				
    1.35  			</body>
    1.36  		</html>
    1.37  	</xsl:template>
    1.38 @@ -55,6 +56,7 @@
    1.39  		</xsl:element>
    1.40      </xsl:template>
    1.41      
    1.42 +    <!-- Odkazy na JavaScript a kaskádové styly -->
    1.43      <xsl:template match="g:web/g:js">
    1.44      	<script src="{text()}" type="text/javascript" />
    1.45      </xsl:template>