Nové jmenné prostory: „s“ a „k“ místo „g“.
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 30 Apr 2011 19:34:55 +0200
changeset 1845e41566f8a6
parent 17 02bad17b4590
child 19 b81b96475fe0
Nové jmenné prostory: „s“ a „k“ místo „g“.
vstup/index.xml
vstup/kontakt.xml
vstup/produkty.xml
vstup/služby.xml
vstup/web.conf
vstup/záhlaví.inc
vstup/zápatí.inc
šablona/atom.xsl
šablona/rss.xsl
šablona/sitemap.xsl
šablona/stránka.xsl
     1.1 --- a/vstup/index.xml	Sat Apr 30 17:06:59 2011 +0200
     1.2 +++ b/vstup/index.xml	Sat Apr 30 19:34:55 2011 +0200
     1.3 @@ -1,4 +1,4 @@
     1.4 -<stránka xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor">
     1.5 +<stránka xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana">
     1.6  	<nadpis>Chovatelská stanice</nadpis>
     1.7  	<perex>Úvodní stránka našeho webu.</perex>
     1.8  	<pořadí>10</pořadí>
     2.1 --- a/vstup/kontakt.xml	Sat Apr 30 17:06:59 2011 +0200
     2.2 +++ b/vstup/kontakt.xml	Sat Apr 30 19:34:55 2011 +0200
     2.3 @@ -1,4 +1,4 @@
     2.4 -<stránka xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor">
     2.5 +<stránka xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana">
     2.6  	<nadpis>Kontakt</nadpis>
     2.7  	<perex>Kde nás najdete.</perex>
     2.8  	<pořadí>60</pořadí>
     3.1 --- a/vstup/produkty.xml	Sat Apr 30 17:06:59 2011 +0200
     3.2 +++ b/vstup/produkty.xml	Sat Apr 30 19:34:55 2011 +0200
     3.3 @@ -1,6 +1,6 @@
     3.4  <stránka
     3.5 -	xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
     3.6 -	xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor">
     3.7 +	xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
     3.8 +	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro">
     3.9  	<nadpis>Produkty</nadpis>
    3.10  	<perex>Co vyrábíme.</perex>
    3.11  	<pořadí>20</pořadí>
    3.12 @@ -14,14 +14,14 @@
    3.13  		<p>Fusce eu libero sit amet mauris molestie suscipit. Integer porttitor euismod luctus. Sed elementum quam et quam pharetra tincidunt. Pellentesque vitae augue quis mi blandit dapibus. Vestibulum iaculis magna sit amet nisl tristique at consectetur odio blandit. Proin aliquam lectus ac arcu condimentum tempus. Suspendisse potenti. Suspendisse porttitor euismod accumsan. Sed nibh lacus, laoreet id consequat gravida, eleifend eget lectus. Curabitur accumsan, nisi at elementum aliquam, nisl nulla volutpat lorem, ac elementum metus lacus eget lectus. Praesent odio nulla, porttitor vitae hendrerit vel, ullamcorper in velit. Sed in est ipsum, iaculis accumsan sem. Integer pretium ultrices justo a mattis. Nullam id lacus in lectus bibendum tempor. Nulla non viverra eros. Praesent scelerisque, nisi et placerat convallis, nisi nulla lobortis mauris, eu ultricies est mi ac orci. Suspendisse ullamcorper dapibus interdum. Curabitur ac metus eros, sed venenatis sapien.</p>
    3.14  		
    3.15  		<p>Vhodnost zvířete do domácnosti:</p>
    3.16 -		<g:měřák hodnota="95"/>
    3.17 +		<m:měřák hodnota="95"/>
    3.18  		
    3.19  		<h2>Panda malá</h2>
    3.20  		<p>Vivamus nec dictum dolor. Aliquam et tellus dolor. Curabitur et est sapien. Sed nec neque massa. Integer luctus erat vel arcu molestie ac dapibus dolor pretium. Curabitur eget augue non ipsum pulvinar venenatis eget et lectus. Proin fringilla aliquet sapien, non luctus est lobortis vel. Nunc vehicula volutpat varius. Aliquam suscipit accumsan sollicitudin. Morbi ultricies, mauris id elementum pellentesque, nunc dolor viverra nisl, sit amet consequat velit libero at ligula. Nulla luctus rhoncus tortor nec sollicitudin. Vivamus posuere sodales ipsum, hendrerit cursus felis pharetra sit amet. Nunc interdum facilisis massa ac congue.</p>
    3.21  		<p>Aliquam erat volutpat. Quisque vitae libero est. Aliquam erat volutpat. Integer elementum, nisl nec lacinia facilisis, dolor tellus varius eros, sit amet facilisis sem sapien vitae nulla. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Integer rutrum sodales venenatis. Donec mollis aliquet enim, id venenatis urna faucibus sed. Suspendisse pharetra neque et nibh tincidunt suscipit. Morbi ut justo sit amet lectus faucibus tempor quis non libero. Aenean in dolor sem, in lacinia sem.</p>
    3.22  		
    3.23  		<p>Vhodnost zvířete do domácnosti:</p>
    3.24 -		<g:měřák hodnota="80"/>
    3.25 +		<m:měřák hodnota="80"/>
    3.26      </text>
    3.27  
    3.28  </stránka>
     4.1 --- a/vstup/služby.xml	Sat Apr 30 17:06:59 2011 +0200
     4.2 +++ b/vstup/služby.xml	Sat Apr 30 19:34:55 2011 +0200
     4.3 @@ -1,4 +1,4 @@
     4.4 -<stránka xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor">
     4.5 +<stránka xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana">
     4.6  	<nadpis>Služby</nadpis>
     4.7  	<perex>Co poskytujeme.</perex>
     4.8  	<pořadí>30</pořadí>
     5.1 --- a/vstup/web.conf	Sat Apr 30 17:06:59 2011 +0200
     5.2 +++ b/vstup/web.conf	Sat Apr 30 19:34:55 2011 +0200
     5.3 @@ -1,4 +1,4 @@
     5.4 -<web xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor">
     5.5 +<web xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace">
     5.6  	<název>Chovatelská stanice tučňáků</název>
     5.7  	<podtitul>vše pro tučňáky</podtitul>
     5.8  	<autor>
     6.1 --- a/vstup/záhlaví.inc	Sat Apr 30 17:06:59 2011 +0200
     6.2 +++ b/vstup/záhlaví.inc	Sat Apr 30 19:34:55 2011 +0200
     6.3 @@ -1,5 +1,5 @@
     6.4  <stránka
     6.5 -	xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
     6.6 +	xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
     6.7  	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro">
     6.8  	<text xmlns="http://www.w3.org/1999/xhtml">
     6.9  		<p class="logo">
     7.1 --- a/vstup/zápatí.inc	Sat Apr 30 17:06:59 2011 +0200
     7.2 +++ b/vstup/zápatí.inc	Sat Apr 30 19:34:55 2011 +0200
     7.3 @@ -1,4 +1,4 @@
     7.4 -<stránka xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor">
     7.5 +<stránka xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana">
     7.6  	<text xmlns="http://www.w3.org/1999/xhtml">
     7.7  		<p>
     7.8  			Poháněno tučňákem. Vytvořeno pomocí <a href="https://trac.frantovo.cz/xml-web-generator/">XML Web generátoru</a>. Používá XML, XSLT, Ant a další dobroty.
     8.1 --- a/šablona/atom.xsl	Sat Apr 30 17:06:59 2011 +0200
     8.2 +++ b/šablona/atom.xsl	Sat Apr 30 19:34:55 2011 +0200
     8.3 @@ -1,11 +1,12 @@
     8.4  <?xml version="1.0" encoding="UTF-8"?>
     8.5  <xsl:stylesheet version="2.0"
     8.6  	xmlns="http://www.w3.org/2005/Atom"
     8.7 -	xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
     8.8 +	xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
     8.9 +	xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace"
    8.10  	xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce"
    8.11  	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    8.12  	xmlns:fn="http://www.w3.org/2005/xpath-functions"
    8.13 -	exclude-result-prefixes="fn g j">
    8.14 +	exclude-result-prefixes="fn s k j">
    8.15  	<xsl:output	method="xml" indent="yes" encoding="UTF-8"/>
    8.16  	
    8.17  	<xsl:param name="vstupníPřípona" select="'.xml'"/>
    8.18 @@ -14,27 +15,26 @@
    8.19  	<xsl:template match="/">		
    8.20  	
    8.21  		<feed>
    8.22 -			<title><xsl:value-of select="g:web/g:název"/></title>
    8.23 -			<subtitle><xsl:value-of select="g:web/g:podtitul"/></subtitle>
    8.24 -			<link rel="self" href="{concat(g:web/g:url, 'atom.xml')}"/>
    8.25 -			<link href="{g:web/g:url}"/>			
    8.26 +			<title><xsl:value-of select="k:web/k:název"/></title>
    8.27 +			<subtitle><xsl:value-of select="k:web/k:podtitul"/></subtitle>
    8.28 +			<link rel="self" href="{concat(k:web/k:url, 'atom.xml')}"/>
    8.29 +			<link href="{k:web/k:url}"/>			
    8.30  			<updated><xsl:value-of select="current-dateTime()"/></updated>			
    8.31  			<author>
    8.32 -				<name><xsl:value-of select="g:web/g:autor/g:jméno"/></name>
    8.33 -				<email><xsl:value-of select="g:web/g:autor/g:email"/></email>
    8.34 +				<name><xsl:value-of select="k:web/k:autor/k:jméno"/></name>
    8.35 +				<email><xsl:value-of select="k:web/k:autor/k:email"/></email>
    8.36  			</author>
    8.37 -			<id><xsl:value-of select="concat('urn:uuid:', g:web/g:uuid)"/></id>
    8.38 +			<id><xsl:value-of select="concat('urn:uuid:', k:web/k:uuid)"/></id>
    8.39  			
    8.40  			<xsl:variable name="konfigurace" select="/"/>
    8.41 -			<xsl:for-each select="collection(concat('../vstup/?select=*', $vstupníPřípona))[empty(g:stránka/g:skrytá) or not(g:stránka/g:skrytá)]">
    8.42 +			<xsl:for-each select="collection(concat('../vstup/?select=*', $vstupníPřípona))[empty(s:stránka/s:skrytá) or not(s:stránka/s:skrytá)]">
    8.43  				<entry>
    8.44 -					<title><xsl:value-of select="g:stránka/g:nadpis"/></title>
    8.45 +					<title><xsl:value-of select="s:stránka/s:nadpis"/></title>
    8.46  					<xsl:variable name="soubor" select="replace(tokenize(document-uri(.), '/')[last()], $vstupníPřípona, '')"/>
    8.47 -					<link href="{concat($konfigurace/g:web/g:url, encode-for-uri($soubor), $výstupníPřípona)}" />
    8.48 -					<id><xsl:value-of select="concat('urn:', $konfigurace/g:web/g:kod ,':strana:', encode-for-uri($soubor))"/></id>
    8.49 -					<!--2010-10-09T20:51:04Z-->
    8.50 +					<link href="{concat($konfigurace/k:web/k:url, encode-for-uri($soubor), $výstupníPřípona)}" />
    8.51 +					<id><xsl:value-of select="concat('urn:', $konfigurace/k:web/k:kod ,':strana:', encode-for-uri($soubor))"/></id>					
    8.52  					<updated><xsl:value-of select="j:posledníZměna(document-uri(.))"/></updated>
    8.53 -					<summary><xsl:value-of select="g:stránka/g:perex"/></summary>
    8.54 +					<summary><xsl:value-of select="s:stránka/s:perex"/></summary>
    8.55  				</entry>
    8.56  			</xsl:for-each>
    8.57  			
     9.1 --- a/šablona/rss.xsl	Sat Apr 30 17:06:59 2011 +0200
     9.2 +++ b/šablona/rss.xsl	Sat Apr 30 19:34:55 2011 +0200
     9.3 @@ -2,11 +2,10 @@
     9.4  <xsl:stylesheet version="2.0"
     9.5  	xmlns:a="http://www.w3.org/2005/Atom"
     9.6  	xmlns:atom="http://www.w3.org/2005/Atom"
     9.7 -	xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
     9.8  	xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce"
     9.9  	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    9.10  	xmlns:fn="http://www.w3.org/2005/xpath-functions"
    9.11 -	exclude-result-prefixes="fn g j a">
    9.12 +	exclude-result-prefixes="fn j a">
    9.13  	<xsl:output	method="xml" indent="yes" encoding="UTF-8"/>
    9.14  	
    9.15  	<xsl:template match="/">		
    10.1 --- a/šablona/sitemap.xsl	Sat Apr 30 17:06:59 2011 +0200
    10.2 +++ b/šablona/sitemap.xsl	Sat Apr 30 19:34:55 2011 +0200
    10.3 @@ -2,11 +2,10 @@
    10.4  <xsl:stylesheet version="2.0"
    10.5  	xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
    10.6  	xmlns:a="http://www.w3.org/2005/Atom"
    10.7 -	xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
    10.8  	xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce"
    10.9  	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   10.10  	xmlns:fn="http://www.w3.org/2005/xpath-functions"
   10.11 -	exclude-result-prefixes="fn g j a">
   10.12 +	exclude-result-prefixes="fn j a">
   10.13  	<xsl:output	method="xml" indent="yes" encoding="UTF-8"/>
   10.14  	
   10.15  	<xsl:template match="/">
    11.1 --- a/šablona/stránka.xsl	Sat Apr 30 17:06:59 2011 +0200
    11.2 +++ b/šablona/stránka.xsl	Sat Apr 30 19:34:55 2011 +0200
    11.3 @@ -2,13 +2,14 @@
    11.4  <xsl:stylesheet version="2.0"
    11.5  	xmlns="http://www.w3.org/1999/xhtml"
    11.6  	xmlns:h="http://www.w3.org/1999/xhtml"
    11.7 -	xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
    11.8 +	xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
    11.9 +	xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace"
   11.10  	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
   11.11  	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   11.12  	xmlns:fn="http://www.w3.org/2005/xpath-functions"
   11.13  	xmlns:svg="http://www.w3.org/2000/svg"
   11.14  	xmlns:xs="http://www.w3.org/2001/XMLSchema"
   11.15 -	exclude-result-prefixes="fn h g xs m">
   11.16 +	exclude-result-prefixes="fn h s k xs m">
   11.17  	<xsl:output 
   11.18  		method="xml" 
   11.19  		indent="yes" 
   11.20 @@ -31,36 +32,36 @@
   11.21  				<xsl:if test="$podporaZaostalýchProhlížečů">
   11.22  					<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
   11.23  				</xsl:if>
   11.24 -				<title><xsl:value-of select="g:stránka/g:nadpis"/></title>
   11.25 +				<title><xsl:value-of select="s:stránka/s:nadpis"/></title>
   11.26  				<link title="Novinky (Atom)" href="atom.xml" type="application/atom+xml" rel="alternate"/>
   11.27  				<link title="Novinky (RSS)"  href="rss.xml"  type="application/rss+xml"  rel="alternate"/>
   11.28 -				<xsl:apply-templates select="$konfigurace/g:web/g:js"/>
   11.29 -				<xsl:apply-templates select="$konfigurace/g:web/g:css"/>				
   11.30 +				<xsl:apply-templates select="$konfigurace/k:web/k:js"/>
   11.31 +				<xsl:apply-templates select="$konfigurace/k:web/k:css"/>				
   11.32  			</head>
   11.33  			<body>
   11.34  				<div id="tělo">
   11.35  					<div id="záhlaví">
   11.36 -						<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'záhlaví', $vsuvkováPřípona)))/g:stránka/h:text/node()"/>
   11.37 +						<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'záhlaví', $vsuvkováPřípona)))/s:stránka/h:text/node()"/>
   11.38  					</div>
   11.39  					<div id="vnitřek">
   11.40 -						<h1><xsl:value-of select="g:stránka/g:nadpis"/></h1>
   11.41 +						<h1><xsl:value-of select="s:stránka/s:nadpis"/></h1>
   11.42  						<ul id="nabídka">
   11.43 -							<xsl:for-each select="collection(concat('../vstup/?select=*', $vstupníPřípona))[g:stránka/g:pořadí]">
   11.44 -								<xsl:sort select="empty(./g:stránka/g:pořadí)"/>
   11.45 -								<xsl:sort select="./g:stránka/g:pořadí"/>
   11.46 +							<xsl:for-each select="collection(concat('../vstup/?select=*', $vstupníPřípona))[s:stránka/s:pořadí]">
   11.47 +								<xsl:sort select="empty(./s:stránka/s:pořadí)"/>
   11.48 +								<xsl:sort select="./s:stránka/s:pořadí"/>
   11.49  								<li>
   11.50  									<xsl:variable name="xmlSoubor" select="tokenize(document-uri(.), '/')[last()]"/>
   11.51  									<xsl:variable name="xhtmlSoubor" select="replace($xmlSoubor, $vstupníPřípona, $výstupníPřípona)"/>
   11.52 -									<a href="{fn:encode-for-uri($xhtmlSoubor)}"><xsl:value-of select="./g:stránka/g:nadpis"/></a>
   11.53 +									<a href="{fn:encode-for-uri($xhtmlSoubor)}"><xsl:value-of select="./s:stránka/s:nadpis"/></a>
   11.54  								</li>
   11.55  							</xsl:for-each>
   11.56  						</ul>
   11.57  						<div id="text">
   11.58 -							<xsl:apply-templates select="g:stránka/h:text/node()"/>
   11.59 +							<xsl:apply-templates select="s:stránka/h:text/node()"/>
   11.60  						</div>
   11.61  					</div>
   11.62  					<div id="zápatí">
   11.63 -						<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'zápatí', $vsuvkováPřípona)))/g:stránka/h:text/node()"/>
   11.64 +						<xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'zápatí', $vsuvkováPřípona)))/s:stránka/h:text/node()"/>
   11.65  					</div>
   11.66  				</div>
   11.67  			</body>
   11.68 @@ -75,7 +76,7 @@
   11.69  		</xsl:element>
   11.70      </xsl:template>
   11.71      
   11.72 -    <!-- Odkazy na JavaScript a kaskádové styly -->
   11.73 +    <!-- Varování pro případ, že jsme v režimu podpory pro zaostalé prohlížeče -->
   11.74      <xsl:template name="varováníRetardace">
   11.75      	<xsl:if test="$podporaZaostalýchProhlížečů">
   11.76  			<xsl:comment>
   11.77 @@ -84,13 +85,15 @@
   11.78  				jako je např. Firefox nebo Chromium (případně Opera či Safari).
   11.79  			</xsl:comment>
   11.80      	</xsl:if>
   11.81 -    </xsl:template>    
   11.82 -    <xsl:template match="g:web/g:js">    	
   11.83 +    </xsl:template>
   11.84 +
   11.85 +    <!-- Odkazy na JavaScript a kaskádové styly -->    
   11.86 +    <xsl:template match="k:web/k:js">    	
   11.87      	<script src="{text()}" type="text/javascript">
   11.88      		<xsl:call-template name="varováníRetardace"/>
   11.89      	</script>
   11.90      </xsl:template>
   11.91 -    <xsl:template match="g:web/g:css">
   11.92 +    <xsl:template match="k:web/k:css">
   11.93      	<link href="{text()}" type="text/css" rel="StyleSheet" />
   11.94      </xsl:template>
   11.95     
   11.96 @@ -110,7 +113,7 @@
   11.97      </xsl:template>
   11.98      
   11.99      <!-- Ukázka vlastního „makra“: -->
  11.100 -    <xsl:template match="g:měřák">
  11.101 +    <xsl:template match="m:měřák">
  11.102      	<xsl:variable name="hodnota" select="number(@hodnota)"/>
  11.103      	<xsl:variable name="šířkaGrafu" select="128"/>
  11.104  		<xsl:choose>