šablona/syntaxe.xsl
author František Kučera <franta-hg@frantovo.cz>
Thu, 05 Jul 2012 14:27:01 +0200
changeset 106 ae484a54d7fb
parent 87 25dec6931f18
permissions -rw-r--r--
#20 Skriptování: Podpora spouštění skriptů ze šablon (ne jen z dokumentů), oprava chyby (URI stránky bylo null), ale při přiřazování výstupu skriptu do proměnné nejde použít disable-output-escaping="yes" resp. vloží se escapovaný výstup (jiná makra lze přes proměnné procpat a používat je tak v jiných makrech). viz http://www.stylusstudio.com/xsllist/200105/post40940.html

<?xml version="1.0" encoding="UTF-8"?>
<!--
XML Web generátor – program na generování webových stránek
Copyright © 2012 František Kučera (frantovo.cz)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->
<xsl:stylesheet version="2.0"
	xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace"
	xmlns:j="java:cz.frantovo.xmlWebGenerator.makra.Pre"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:fn="http://www.w3.org/2005/xpath-functions">
	<xsl:output method="text" encoding="UTF-8"/>

	<!--
		Vytvoří CSS soubor pro zvýrazňování syntaxe
	-->
	<xsl:template match="/">
		<xsl:if test="k:web/k:css[text() = 'css/syntaxe.css']"><xsl:value-of select="j:generujCssSyntaxe()"/></xsl:if>
	</xsl:template>

</xsl:stylesheet>