equal
deleted
inserted
replaced
|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <xsl:stylesheet version="2.0" |
|
3 xmlns="http://www.w3.org/1999/xhtml" |
|
4 xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro" |
|
5 xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce" |
|
6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
7 exclude-result-prefixes="m j"> |
|
8 |
|
9 <!-- |
|
10 Wiki syntaxe |
|
11 ************ |
|
12 Text nemusíme vkládat v (X)HTML, ale můžeme ho uzavřít do této značky a používat „wiki“ syntaxi. |
|
13 * |
|
14 @syntaxe nepovinný atribut (zatím je podporován jen markdown procesor). |
|
15 --> |
|
16 <xsl:template match="m:wiki"> |
|
17 <xsl:variable name="wikiXHTML" select="j:formátujWiki(text(), @syntaxe)"/> |
|
18 <xsl:choose> |
|
19 <xsl:when test="$wikiXHTML"> |
|
20 <xsl:value-of select="$wikiXHTML" disable-output-escaping="yes"/> |
|
21 </xsl:when> |
|
22 <xsl:otherwise> |
|
23 <xsl:message terminate="yes">Při zpracování wiki syntaxe došlo k chybě.</xsl:message> |
|
24 </xsl:otherwise> |
|
25 </xsl:choose> |
|
26 </xsl:template> |
|
27 |
|
28 </xsl:stylesheet> |