Show
Ignore:
Timestamp:
04/30/11 19:34:55 (13 years ago)
Author:
František Kučera <franta-hg@…>
Branch:
default
Message:

Nové jmenné prostory: „s“ a „k“ místo „g“.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • šablona/stránka.xsl

    r17 r18  
    33        xmlns="http://www.w3.org/1999/xhtml" 
    44        xmlns:h="http://www.w3.org/1999/xhtml" 
    5         xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor" 
     5        xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana" 
     6        xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace" 
    67        xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro" 
    78        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
     
    910        xmlns:svg="http://www.w3.org/2000/svg" 
    1011        xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    11         exclude-result-prefixes="fn h g xs m"> 
     12        exclude-result-prefixes="fn h s k xs m"> 
    1213        <xsl:output  
    1314                method="xml"  
     
    3233                                        <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> 
    3334                                </xsl:if> 
    34                                 <title><xsl:value-of select="g:stránka/g:nadpis"/></title> 
     35                                <title><xsl:value-of select="s:stránka/s:nadpis"/></title> 
    3536                                <link title="Novinky (Atom)" href="atom.xml" type="application/atom+xml" rel="alternate"/> 
    3637                                <link title="Novinky (RSS)"  href="rss.xml"  type="application/rss+xml"  rel="alternate"/> 
    37                                 <xsl:apply-templates select="$konfigurace/g:web/g:js"/> 
    38                                 <xsl:apply-templates select="$konfigurace/g:web/g:css"/>                                 
     38                                <xsl:apply-templates select="$konfigurace/k:web/k:js"/> 
     39                                <xsl:apply-templates select="$konfigurace/k:web/k:css"/>                                 
    3940                        </head> 
    4041                        <body> 
    4142                                <div id="tělo"> 
    4243                                        <div id="záhlaví"> 
    43                                                 <xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'záhlaví', $vsuvkováPřípona)))/g:stránka/h:text/node()"/> 
     44                                                <xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'záhlaví', $vsuvkováPřípona)))/s:stránka/h:text/node()"/> 
    4445                                        </div> 
    4546                                        <div id="vnitřek"> 
    46                                                 <h1><xsl:value-of select="g:stránka/g:nadpis"/></h1> 
     47                                                <h1><xsl:value-of select="s:stránka/s:nadpis"/></h1> 
    4748                                                <ul id="nabídka"> 
    48                                                         <xsl:for-each select="collection(concat('../vstup/?select=*', $vstupníPřípona))[g:stránka/g:pořadí]"> 
    49                                                                 <xsl:sort select="empty(./g:stránka/g:pořadí)"/> 
    50                                                                 <xsl:sort select="./g:stránka/g:pořadí"/> 
     49                                                        <xsl:for-each select="collection(concat('../vstup/?select=*', $vstupníPřípona))[s:stránka/s:pořadí]"> 
     50                                                                <xsl:sort select="empty(./s:stránka/s:pořadí)"/> 
     51                                                                <xsl:sort select="./s:stránka/s:pořadí"/> 
    5152                                                                <li> 
    5253                                                                        <xsl:variable name="xmlSoubor" select="tokenize(document-uri(.), '/')[last()]"/> 
    5354                                                                        <xsl:variable name="xhtmlSoubor" select="replace($xmlSoubor, $vstupníPřípona, $výstupníPřípona)"/> 
    54                                                                         <a href="{fn:encode-for-uri($xhtmlSoubor)}"><xsl:value-of select="./g:stránka/g:nadpis"/></a> 
     55                                                                        <a href="{fn:encode-for-uri($xhtmlSoubor)}"><xsl:value-of select="./s:stránka/s:nadpis"/></a> 
    5556                                                                </li> 
    5657                                                        </xsl:for-each> 
    5758                                                </ul> 
    5859                                                <div id="text"> 
    59                                                         <xsl:apply-templates select="g:stránka/h:text/node()"/> 
     60                                                        <xsl:apply-templates select="s:stránka/h:text/node()"/> 
    6061                                                </div> 
    6162                                        </div> 
    6263                                        <div id="zápatí"> 
    63                                                 <xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'zápatí', $vsuvkováPřípona)))/g:stránka/h:text/node()"/> 
     64                                                <xsl:apply-templates select="document(fn:encode-for-uri(concat($vstup, 'zápatí', $vsuvkováPřípona)))/s:stránka/h:text/node()"/> 
    6465                                        </div> 
    6566                                </div> 
     
    7677    </xsl:template> 
    7778     
    78     <!-- Odkazy na JavaScript a kaskádové styly --> 
     79    <!-- Varování pro případ, že jsme v režimu podpory pro zaostalé prohlížeče --> 
    7980    <xsl:template name="varováníRetardace"> 
    8081        <xsl:if test="$podporaZaostalýchProhlížečů"> 
     
    8586                        </xsl:comment> 
    8687        </xsl:if> 
    87     </xsl:template>     
    88     <xsl:template match="g:web/g:js">            
     88    </xsl:template> 
     89 
     90    <!-- Odkazy na JavaScript a kaskádové styly -->     
     91    <xsl:template match="k:web/k:js">            
    8992        <script src="{text()}" type="text/javascript"> 
    9093                <xsl:call-template name="varováníRetardace"/> 
    9194        </script> 
    9295    </xsl:template> 
    93     <xsl:template match="g:web/g:css"> 
     96    <xsl:template match="k:web/k:css"> 
    9497        <link href="{text()}" type="text/css" rel="StyleSheet" /> 
    9598    </xsl:template> 
     
    111114     
    112115    <!-- Ukázka vlastního „makra“: --> 
    113     <xsl:template match="g:měřák"> 
     116    <xsl:template match="m:měřák"> 
    114117        <xsl:variable name="hodnota" select="number(@hodnota)"/> 
    115118        <xsl:variable name="šířkaGrafu" select="128"/>