šablona/makra/skriptování.xsl
changeset 107 379a2a893fd1
parent 106 ae484a54d7fb
child 108 8d9cab64c335
equal deleted inserted replaced
106:ae484a54d7fb 107:379a2a893fd1
    16 You should have received a copy of the GNU General Public License
    16 You should have received a copy of the GNU General Public License
    17 along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17 along with this program.  If not, see <http://www.gnu.org/licenses/>.
    18 -->
    18 -->
    19 <xsl:stylesheet version="2.0"
    19 <xsl:stylesheet version="2.0"
    20 	xmlns="http://www.w3.org/1999/xhtml"
    20 	xmlns="http://www.w3.org/1999/xhtml"
       
    21 	xmlns:h="http://www.w3.org/1999/xhtml"
    21 	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
    22 	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
    22 	xmlns:j="java:cz.frantovo.xmlWebGenerator.makra.Skriptování"
    23 	xmlns:j="java:cz.frantovo.xmlWebGenerator.makra.Skriptování"
    23 	xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace"
    24 	xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace"
    24 	xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
    25 	xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
    25 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    26 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    47 																	@výstup,
    48 																	@výstup,
    48 																	(document-uri(/), resolve-uri('.'))[1],
    49 																	(document-uri(/), resolve-uri('.'))[1],
    49 																	//s:stránka/s:nadpis/text(),
    50 																	//s:stránka/s:nadpis/text(),
    50 																	//s:stránka/s:perex/text()
    51 																	//s:stránka/s:perex/text()
    51 																)"/>
    52 																)"/>
    52 				<xsl:choose>
    53 				<xsl:apply-templates select="$výstupSkriptu/h:html/h:body/node()"/>
    53 					<xsl:when test="$výstupSkriptu">
       
    54 						<xsl:choose>
       
    55 							<xsl:when test="@výstup = 'xml'"><xsl:value-of select="$výstupSkriptu" disable-output-escaping="yes"/></xsl:when>
       
    56 							<xsl:otherwise><xsl:value-of select="$výstupSkriptu"/></xsl:otherwise>
       
    57 						</xsl:choose>
       
    58 					</xsl:when>
       
    59 					<xsl:otherwise>
       
    60 						<xsl:message terminate="yes">Při interpretaci skriptu došlo k chybě.</xsl:message>
       
    61 					</xsl:otherwise>
       
    62 				</xsl:choose>
       
    63 			</xsl:when>
    54 			</xsl:when>
    64 
    55 
    65 			<xsl:when test="$režim = 'zakázat'">
    56 			<xsl:when test="$režim = 'zakázat'">
    66 				<xsl:message terminate="yes">Stránka obsahuje skripty, ale skripty jsou zakázané → je potřeba je odstranit nebo upravit nastavení ve web.conf.</xsl:message>
    57 				<xsl:message terminate="yes">Stránka obsahuje skripty, ale skripty jsou zakázané → je potřeba je odstranit nebo upravit nastavení ve web.conf.</xsl:message>
    67 			</xsl:when>
    58 			</xsl:when>