1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/šablona/stránka.xsl Sat Apr 02 19:20:45 2011 +0200
1.3 @@ -0,0 +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 +
1.10 + <xsl:template match="/">
1.11 + <html>
1.12 + <head>
1.13 + <title><xsl:value-of select="stránka/@titulek"/></title>
1.14 + </head>
1.15 + <body>
1.16 + <xsl:choose>
1.17 + <xsl:when test="stránka/nadpis">
1.18 + <!--
1.19 + Element nadpis je nepovinný, můžeme ho použít, pokud zde chceme formátovaný text
1.20 + nebo prostě jiný text než v titulku stránky.
1.21 + -->
1.22 + <h1><xsl:value-of select="stránka/nadpis"/></h1>
1.23 + </xsl:when>
1.24 + <xsl:otherwise>
1.25 + <h1><xsl:value-of select="stránka/@titulek"/></h1>
1.26 + </xsl:otherwise>
1.27 + </xsl:choose>
1.28 +
1.29 + <!--
1.30 + Vložíme obsah stránky:
1.31 + -->
1.32 + <xsl:apply-templates select="stránka/node()"/>
1.33 + </body>
1.34 + </html>
1.35 + </xsl:template>
1.36 +
1.37 +
1.38 + <xsl:template match="node()|@*">
1.39 + <xsl:copy>
1.40 + <xsl:apply-templates select="node()|@*"/>
1.41 + </xsl:copy>
1.42 + </xsl:template>
1.43 +
1.44 +</xsl:stylesheet>