šablona/makra/podČarou.xsl
author František Kučera <franta-hg@frantovo.cz>
Thu, 24 Oct 2019 22:06:44 +0200
changeset 136 d5feb9d8ebc3
parent 91 1a70b4045a19
permissions -rw-r--r--
fix license version: GNU GPLv3
franta-hg@91
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@91
     2
<!--
franta-hg@91
     3
XML Web generátor – program na generování webových stránek
franta-hg@91
     4
Copyright © 2012 František Kučera (frantovo.cz)
franta-hg@91
     5
franta-hg@91
     6
This program is free software: you can redistribute it and/or modify
franta-hg@91
     7
it under the terms of the GNU General Public License as published by
franta-hg@136
     8
the Free Software Foundation, version 3 of the License.
franta-hg@91
     9
franta-hg@91
    10
This program is distributed in the hope that it will be useful,
franta-hg@91
    11
but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@91
    12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
franta-hg@91
    13
GNU General Public License for more details.
franta-hg@91
    14
franta-hg@91
    15
You should have received a copy of the GNU General Public License
franta-hg@91
    16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
franta-hg@91
    17
-->
franta-hg@91
    18
<xsl:stylesheet version="2.0"
franta-hg@91
    19
	xmlns="http://www.w3.org/1999/xhtml"
franta-hg@91
    20
	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
franta-hg@91
    21
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
franta-hg@91
    22
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
franta-hg@91
    23
	exclude-result-prefixes="m xs">
franta-hg@91
    24
franta-hg@91
    25
	<!--
franta-hg@91
    26
		Poznámky pod čarou
franta-hg@91
    27
		******************
franta-hg@91
    28
		Vloží do textu číslo (odkaz) a obsah elementu dá až na konec stránky pod čáru.
franta-hg@91
    29
		Z poznámek vede také zpětný odkaz na místo, odkud bylo odkazováno.
franta-hg@91
    30
		*
franta-hg@91
    31
	-->
franta-hg@91
    32
	<xsl:template match="m:podČarou">
franta-hg@91
    33
		<xsl:variable name="číslo"><xsl:number level="any"/></xsl:variable>
franta-hg@91
    34
		<sup class="podČarou-odkaz" id="podČarou-odkaz-{$číslo}">
franta-hg@91
    35
			<a href="#{encode-for-uri('podČarou-poznámka')}-{$číslo}"><xsl:value-of select="$číslo"/></a>
franta-hg@91
    36
		</sup>
franta-hg@91
    37
	</xsl:template>
franta-hg@91
    38
franta-hg@91
    39
	<xsl:template name="poznámkyPodČarou">
franta-hg@91
    40
		<xsl:if test="//m:podČarou">
franta-hg@91
    41
			<div class="podČarou-poznámky" title="Poznámky pod čarou">
franta-hg@91
    42
				<xsl:for-each select="//m:podČarou">
franta-hg@91
    43
					<p id="podČarou-poznámka-{position()}">
franta-hg@91
    44
						<a href="#{encode-for-uri('podČarou-odkaz')}-{position()}" class="podČarou-odkaz-zpět"><xsl:value-of select="position()"/>.</a>
franta-hg@91
    45
						<xsl:apply-templates/>
franta-hg@91
    46
					</p>
franta-hg@91
    47
				</xsl:for-each>
franta-hg@91
    48
			</div>
franta-hg@91
    49
		</xsl:if>
franta-hg@91
    50
	</xsl:template>
franta-hg@91
    51
franta-hg@91
    52
</xsl:stylesheet>
franta-hg@91
    53