author | František Kučera <franta-hg@frantovo.cz> |
Sat Jan 07 01:57:27 2012 +0100 (2012-01-07) | |
changeset 57 | 768a7eecb0cf |
child 61 | 9503eb8377f1 |
permissions | -rw-r--r-- |
franta-hg@51 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
franta-hg@51 | 2 |
<xsl:stylesheet version="2.0" |
franta-hg@51 | 3 |
xmlns="http://www.w3.org/1999/xhtml" |
franta-hg@51 | 4 |
xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro" |
franta-hg@51 | 5 |
xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce" |
franta-hg@51 | 6 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
franta-hg@51 | 7 |
exclude-result-prefixes="m j"> |
franta-hg@51 | 8 |
|
franta-hg@51 | 9 |
<!-- |
franta-hg@51 | 10 |
Wiki syntaxe |
franta-hg@51 | 11 |
************ |
franta-hg@51 | 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. |
franta-hg@51 | 13 |
* |
franta-hg@51 | 14 |
@syntaxe nepovinný atribut (zatím je podporován jen markdown procesor). |
franta-hg@51 | 15 |
--> |
franta-hg@51 | 16 |
<xsl:template match="m:wiki"> |
franta-hg@51 | 17 |
<xsl:variable name="wikiXHTML" select="j:formátujWiki(text(), @syntaxe)"/> |
franta-hg@51 | 18 |
<xsl:choose> |
franta-hg@51 | 19 |
<xsl:when test="$wikiXHTML"> |
franta-hg@51 | 20 |
<xsl:value-of select="$wikiXHTML" disable-output-escaping="yes"/> |
franta-hg@51 | 21 |
</xsl:when> |
franta-hg@51 | 22 |
<xsl:otherwise> |
franta-hg@51 | 23 |
<xsl:message terminate="yes">Při zpracování wiki syntaxe došlo k chybě.</xsl:message> |
franta-hg@51 | 24 |
</xsl:otherwise> |
franta-hg@51 | 25 |
</xsl:choose> |
franta-hg@51 | 26 |
</xsl:template> |
franta-hg@51 | 27 |
|
franta-hg@51 | 28 |
</xsl:stylesheet> |