makro pro XML komentáře
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 01 Jul 2013 17:51:42 +0200
changeset 1287493856248e1
parent 127 4b02189672db
child 129 36c2e2bc2eb4
makro pro XML komentáře
ukázka/kontakt.xml
šablona/makra/xmlKomentář.xsl
     1.1 --- a/ukázka/kontakt.xml	Sun Jun 23 17:04:52 2013 +0200
     1.2 +++ b/ukázka/kontakt.xml	Mon Jul 01 17:51:42 2013 +0200
     1.3 @@ -37,6 +37,8 @@
     1.4  			reditel		->	root;
     1.5  		</m:diagram>
     1.6  
     1.7 +		<m:xmlKomentář>organizační struktury bývají někdy tajemné</m:xmlKomentář>
     1.8 +
     1.9  		<h2>Procesy</h2>
    1.10  
    1.11  		<p>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/šablona/makra/xmlKomentář.xsl	Mon Jul 01 17:51:42 2013 +0200
     2.3 @@ -0,0 +1,38 @@
     2.4 +<?xml version="1.0" encoding="UTF-8"?>
     2.5 +<!--
     2.6 +XML Web generátor – program na generování webových stránek
     2.7 +Copyright © 2012 František Kučera (frantovo.cz)
     2.8 +
     2.9 +This program is free software: you can redistribute it and/or modify
    2.10 +it under the terms of the GNU General Public License as published by
    2.11 +the Free Software Foundation, either version 3 of the License, or
    2.12 +(at your option) any later version.
    2.13 +
    2.14 +This program is distributed in the hope that it will be useful,
    2.15 +but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.16 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2.17 +GNU General Public License for more details.
    2.18 +
    2.19 +You should have received a copy of the GNU General Public License
    2.20 +along with this program.  If not, see <http://www.gnu.org/licenses/>.
    2.21 +-->
    2.22 +<xsl:stylesheet version="2.0"
    2.23 +	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
    2.24 +	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    2.25 +	exclude-result-prefixes="m">
    2.26 +
    2.27 +	<!--
    2.28 +		XML komentář
    2.29 +		************
    2.30 +		vloží XML komentář s mezerami na začátku a na konci
    2.31 +	-->
    2.32 +	<xsl:template match="m:xmlKomentář">
    2.33 +		<xsl:comment>
    2.34 +			<xsl:text> </xsl:text>
    2.35 +			<xsl:apply-templates/>
    2.36 +			<xsl:text> </xsl:text>
    2.37 +		</xsl:comment>
    2.38 +	</xsl:template>
    2.39 +
    2.40 +</xsl:stylesheet>
    2.41 +