franta-hg@94
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
franta-hg@94
|
2 |
<!--
|
franta-hg@94
|
3 |
XML Web generátor – program na generování webových stránek
|
franta-hg@94
|
4 |
Copyright © 2012 František Kučera (frantovo.cz)
|
franta-hg@94
|
5 |
|
franta-hg@94
|
6 |
This program is free software: you can redistribute it and/or modify
|
franta-hg@94
|
7 |
it under the terms of the GNU General Public License as published by
|
franta-hg@94
|
8 |
the Free Software Foundation, either version 3 of the License, or
|
franta-hg@94
|
9 |
(at your option) any later version.
|
franta-hg@94
|
10 |
|
franta-hg@94
|
11 |
This program is distributed in the hope that it will be useful,
|
franta-hg@94
|
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
franta-hg@94
|
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
franta-hg@94
|
14 |
GNU General Public License for more details.
|
franta-hg@94
|
15 |
|
franta-hg@94
|
16 |
You should have received a copy of the GNU General Public License
|
franta-hg@94
|
17 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
franta-hg@94
|
18 |
-->
|
franta-hg@94
|
19 |
<xsl:stylesheet version="2.0"
|
franta-hg@94
|
20 |
xmlns="http://www.w3.org/1999/xhtml"
|
franta-hg@94
|
21 |
xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
|
franta-hg@94
|
22 |
xmlns:j="java:cz.frantovo.xmlWebGenerator.makra.Skriptování"
|
franta-hg@94
|
23 |
xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
|
franta-hg@94
|
24 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
franta-hg@94
|
25 |
exclude-result-prefixes="m j s">
|
franta-hg@94
|
26 |
|
franta-hg@94
|
27 |
<!--
|
franta-hg@94
|
28 |
Skriptování
|
franta-hg@94
|
29 |
***********
|
franta-hg@94
|
30 |
Provedeme skript zadaný v těle elementu a jeho výstup vložíme do stránky.
|
franta-hg@94
|
31 |
*
|
franta-hg@94
|
32 |
@jazyk programovací jazyk, např. bash, perl, php
|
franta-hg@94
|
33 |
@src skript uložený v souboru místo v těle elementu
|
franta-hg@94
|
34 |
-->
|
franta-hg@94
|
35 |
<xsl:template match="m:skript">
|
franta-hg@94
|
36 |
<!--
|
franta-hg@94
|
37 |
TODO:
|
franta-hg@94
|
38 |
- ošetření chyb
|
franta-hg@94
|
39 |
- nastavení z web.conf (zákaz nebo ignorace skriptů)
|
franta-hg@94
|
40 |
- podpora vkládání fragmentů XML, ne jen prostého textu
|
franta-hg@94
|
41 |
-->
|
franta-hg@94
|
42 |
<xsl:value-of select="j:interpretuj(text(), @jazyk, document-uri(/), //s:stránka/s:nadpis/text(), //s:stránka/s:perex/text())"/>
|
franta-hg@94
|
43 |
</xsl:template>
|
franta-hg@94
|
44 |
|
franta-hg@94
|
45 |
</xsl:stylesheet>
|
franta-hg@94
|
46 |
|