Changeset 6:801a8935caf7

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

Java funkce pro zjištění poslední úpravy souboru, Atom agregace, konfigurační soubor webu.

Files:
3 added
3 modified

Legend:

Unmodified
Added
Removed
  • analýza/princip.dot

    r1 r6  
    22    rankdir=LR 
    33 
    4     gen         [label="Generátor" shape="box" labelURL="xxxxxxxx"] 
     4    gen         [label="Generátor\n(Ant: build.xml)" shape="box"] 
    55    xml         [label="Texty v XML"] 
    66    xhtml       [label="XHTML web"] 
    7     xslt        [label="XSLT šablona"] 
     7    xslt        [label="XSLT šablony"] 
    88 
    9     xml -> gen -> xhtml; 
     9    atom        [label="Atom"] 
     10    rss         [label="RSS"] 
     11    sitemap     [label="sitemap.xml"] 
     12 
     13    xml -> gen; 
    1014    xslt -> gen; 
     15 
     16    gen -> xhtml; 
     17    gen -> atom; 
     18    gen -> rss; 
     19    gen -> sitemap; 
    1120} 
  • build.xml

    r4 r6  
    88        <property name="funkce" value="${šablona}/funkce/build/classes"/> 
    99         
    10         <target name="generuj" description="Vygeneruje XHTML webové stránky.">           
     10        <target name="generuj" description="Vygeneruje kompletní web." depends="kompiluj-funkce,stránky,agregace"> 
     11        </target> 
     12         
     13        <target name="stránky" description="Vygeneruje XHTML webové stránky.">           
    1114                <xslt basedir="${vstup}" destdir="${výstup}" includes="*.xml" extension=".xhtml" style="${šablona}/stránka.xsl"> 
    1215                        <classpath location="/usr/share/java/saxonb-9.0.jar"/> 
    13             <classpath location="${funkce}"/> 
    14                          
    15             <factory name="net.sf.saxon.TransformerFactoryImpl"> 
     16                        <classpath location="${funkce}"/> 
     17                        <factory name="net.sf.saxon.TransformerFactoryImpl"> 
    1618                                <attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>                            
    1719                        </factory> 
    18                          
    19                         <sysproperty key="javax.xml.parsers.DocumentBuilderFactory" value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> 
    20                         <sysproperty key="javax.xml.parsers.SAXParserFactory" value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/> 
    21                         <sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration" value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>                   
    2220                </xslt> 
    2321        </target> 
    2422         
     23        <target name="agregace" description="Vytvoří agregované výstupy: RSS, Atom, Sitemap.xml"> 
     24                <xslt in="${vstup}/web.conf" out="${výstup}/atom.xml" style="${šablona}/atom.xsl"> 
     25                        <param name="konfigurák" expression="../vstup/web.conf"/> 
     26                        <classpath location="/usr/share/java/saxonb-9.0.jar"/> 
     27                        <classpath location="${funkce}"/>                        
     28                        <factory name="net.sf.saxon.TransformerFactoryImpl"> 
     29                                <attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>                            
     30                        </factory> 
     31                </xslt>  
     32        </target> 
     33         
     34        <target name="kompiluj-funkce" description="">           
     35                <mkdir dir="${funkce}"/> 
     36                <javac 
     37                        srcdir="${šablona}/funkce/src" 
     38                        destdir="${funkce}"                      
     39                        includeAntRuntime="no"> 
     40                </javac> 
     41        </target> 
     42         
    2543</project> 
  • šablona/stránka.xsl

    r5 r6  
    1919                <html> 
    2020                        <head> 
    21                                 <title><xsl:value-of select="g:stránka/g:nadpis"/></title>                               
     21                                <title><xsl:value-of select="g:stránka/g:nadpis"/></title> 
     22                                <link title="Novinky (Atom)" href="atom.xml" type="application/atom+xml" rel="alternate" /> 
     23                                <link title="Novinky (RSS)" href="rss.xml" type="application/atom+xml" rel="alternate" />                                
    2224                        </head> 
    2325                        <body>