1.1 --- a/šablona/stránka.xsl Sat Apr 30 12:48:19 2011 +0200
1.2 +++ b/šablona/stránka.xsl Sat Apr 30 17:06:59 2011 +0200
1.3 @@ -3,11 +3,12 @@
1.4 xmlns="http://www.w3.org/1999/xhtml"
1.5 xmlns:h="http://www.w3.org/1999/xhtml"
1.6 xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
1.7 + xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
1.8 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1.9 xmlns:fn="http://www.w3.org/2005/xpath-functions"
1.10 xmlns:svg="http://www.w3.org/2000/svg"
1.11 xmlns:xs="http://www.w3.org/2001/XMLSchema"
1.12 - exclude-result-prefixes="fn h g xs">
1.13 + exclude-result-prefixes="fn h g xs m">
1.14 <xsl:output
1.15 method="xml"
1.16 indent="yes"
1.17 @@ -92,6 +93,21 @@
1.18 <xsl:template match="g:web/g:css">
1.19 <link href="{text()}" type="text/css" rel="StyleSheet" />
1.20 </xsl:template>
1.21 +
1.22 + <!--
1.23 + Makro pro převod interních odkazů:
1.24 + - doplnění správné přípony
1.25 + - URL kódování znaků
1.26 + -->
1.27 + <xsl:template match="m:a">
1.28 + <a>
1.29 + <xsl:copy-of select="@*"/>
1.30 + <xsl:attribute name="href">
1.31 + <xsl:value-of select="fn:encode-for-uri(concat(@href, $výstupníPřípona))"/>
1.32 + </xsl:attribute>
1.33 + <xsl:apply-templates/>
1.34 + </a>
1.35 + </xsl:template>
1.36
1.37 <!-- Ukázka vlastního „makra“: -->
1.38 <xsl:template match="g:měřák">