1.1 --- a/šablona/stránka.xsl Sat Apr 02 19:20:45 2011 +0200
1.2 +++ b/šablona/stránka.xsl Sat Apr 02 23:54:23 2011 +0200
1.3 @@ -1,41 +1,41 @@
1.4 <?xml version="1.0" encoding="UTF-8"?>
1.5 <xsl:stylesheet version="2.0"
1.6 xmlns="http://www.w3.org/1999/xhtml"
1.7 - xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
1.8 - <xsl:output method="xml" indent="yes" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/>
1.9 + xmlns:h="http://www.w3.org/1999/xhtml"
1.10 + xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
1.11 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1.12 + xmlns:fn="http://www.w3.org/2005/xpath-functions"
1.13 + exclude-result-prefixes="fn h g">
1.14 + <xsl:output
1.15 + method="xml"
1.16 + indent="yes"
1.17 + encoding="UTF-8"
1.18 + doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
1.19 + doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/>
1.20 +
1.21
1.22 <xsl:template match="/">
1.23 <html>
1.24 <head>
1.25 - <title><xsl:value-of select="stránka/@titulek"/></title>
1.26 + <title><xsl:value-of select="g:stránka/g:nadpis"/></title>
1.27 </head>
1.28 <body>
1.29 - <xsl:choose>
1.30 - <xsl:when test="stránka/nadpis">
1.31 - <!--
1.32 - Element nadpis je nepovinný, můžeme ho použít, pokud zde chceme formátovaný text
1.33 - nebo prostě jiný text než v titulku stránky.
1.34 - -->
1.35 - <h1><xsl:value-of select="stránka/nadpis"/></h1>
1.36 - </xsl:when>
1.37 - <xsl:otherwise>
1.38 - <h1><xsl:value-of select="stránka/@titulek"/></h1>
1.39 - </xsl:otherwise>
1.40 - </xsl:choose>
1.41 + <h1><xsl:value-of select="g:stránka/g:nadpis"/></h1>
1.42
1.43 - <!--
1.44 - Vložíme obsah stránky:
1.45 - -->
1.46 - <xsl:apply-templates select="stránka/node()"/>
1.47 + <!-- Vložíme obsah stránky: -->
1.48 + <xsl:apply-templates select="g:stránka/h:text/node()"/>
1.49 +
1.50 + <!-- Vložíme zápatí: -->
1.51 + <xsl:apply-templates select="document(fn:encode-for-uri('../vstup/zápatí.inc'))/g:stránka/h:text/node()"/>
1.52 +
1.53 </body>
1.54 </html>
1.55 </xsl:template>
1.56
1.57 -
1.58 <xsl:template match="node()|@*">
1.59 - <xsl:copy>
1.60 - <xsl:apply-templates select="node()|@*"/>
1.61 - </xsl:copy>
1.62 - </xsl:template>
1.63 + <xsl:copy>
1.64 + <xsl:apply-templates select="node()|@*"/>
1.65 + </xsl:copy>
1.66 + </xsl:template>
1.67
1.68 </xsl:stylesheet>