| 1 | <?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 | <xsl:stylesheet version="2.0" |
|---|
| 3 | xmlns="http://www.w3.org/1999/xhtml" |
|---|
| 4 | xmlns:h="http://www.w3.org/1999/xhtml" |
|---|
| 5 | xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana" |
|---|
| 6 | xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace" |
|---|
| 7 | xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro" |
|---|
| 8 | xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce" |
|---|
| 9 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|---|
| 10 | xmlns:fn="http://www.w3.org/2005/xpath-functions" |
|---|
| 11 | xmlns:svg="http://www.w3.org/2000/svg" |
|---|
| 12 | xmlns:xs="http://www.w3.org/2001/XMLSchema" |
|---|
| 13 | exclude-result-prefixes="fn h s k m j xs"> |
|---|
| 14 | <xsl:output |
|---|
| 15 | method="xml" |
|---|
| 16 | indent="yes" |
|---|
| 17 | encoding="UTF-8" |
|---|
| 18 | doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" |
|---|
| 19 | doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/> |
|---|
| 20 | <xsl:include href="stránka-společné.xsl"/> |
|---|
| 21 | |
|---|
| 22 | <!-- |
|---|
| 23 | Šablona stránky |
|---|
| 24 | *************** |
|---|
| 25 | --> |
|---|
| 26 | <xsl:template match="/"> |
|---|
| 27 | <html> |
|---|
| 28 | <head> |
|---|
| 29 | <xsl:if test="$podporaZaostalýchProhlížečů"> |
|---|
| 30 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> |
|---|
| 31 | </xsl:if> |
|---|
| 32 | <title><xsl:value-of select="s:stránka/s:nadpis"/></title> |
|---|
| 33 | <link title="Novinky (Atom)" href="atom.xml" type="application/atom+xml" rel="alternate"/> |
|---|
| 34 | <link title="Novinky (RSS)" href="rss.xml" type="application/rss+xml" rel="alternate"/> |
|---|
| 35 | <xsl:apply-templates select="$konfigurace/k:web/k:js"/> |
|---|
| 36 | <xsl:apply-templates select="$konfigurace/k:web/k:css"/> |
|---|
| 37 | </head> |
|---|
| 38 | <body> |
|---|
| 39 | <div id="tělo"> |
|---|
| 40 | <div id="záhlaví"> |
|---|
| 41 | <xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'záhlaví', $vsuvkováPřípona)))/s:stránka/h:text/node()"/> |
|---|
| 42 | </div> |
|---|
| 43 | <div id="vnitřek"> |
|---|
| 44 | <h1><xsl:value-of select="s:stránka/s:nadpis"/></h1> |
|---|
| 45 | <ul id="nabídka"> |
|---|
| 46 | <xsl:for-each select="collection(concat('./', $vstup ,'/?select=*', $vstupníPřípona))[s:stránka/s:pořadí]"> |
|---|
| 47 | <xsl:sort select="empty(./s:stránka/s:pořadí)"/> |
|---|
| 48 | <xsl:sort select="./s:stránka/s:pořadí"/> |
|---|
| 49 | <li> |
|---|
| 50 | <xsl:variable name="xmlSoubor" select="tokenize(document-uri(.), '/')[last()]"/> |
|---|
| 51 | <xsl:variable name="xhtmlSoubor" select="replace($xmlSoubor, $vstupníPřípona, $výstupníPřípona)"/> |
|---|
| 52 | <a href="{fn:encode-for-uri($xhtmlSoubor)}"><xsl:value-of select="./s:stránka/s:nadpis"/></a> |
|---|
| 53 | </li> |
|---|
| 54 | </xsl:for-each> |
|---|
| 55 | </ul> |
|---|
| 56 | <div id="text"> |
|---|
| 57 | <xsl:apply-templates select="s:stránka/h:text/node()"/> |
|---|
| 58 | </div> |
|---|
| 59 | </div> |
|---|
| 60 | <div id="zápatí"> |
|---|
| 61 | <xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'zápatí', $vsuvkováPřípona)))/s:stránka/h:text/node()"/> |
|---|
| 62 | </div> |
|---|
| 63 | </div> |
|---|
| 64 | </body> |
|---|
| 65 | </html> |
|---|
| 66 | </xsl:template> |
|---|
| 67 | |
|---|
| 68 | </xsl:stylesheet> |
|---|