Show
Ignore:
Timestamp:
07/06/12 14:52:05 (12 years ago)
Author:
František Kučera <franta-hg@…>
Branch:
default
Message:

#20 Skriptování: uvnitř zadání skriptu lze používat jiná makra (interpretují se před provedením skriptu).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • šablona/funkce/src/cz/frantovo/xmlWebGenerator/Funkce.java

    r87 r113  
    22 * XML Web generátor – program na generování webových stránek 
    33 * Copyright © 2012 František Kučera (frantovo.cz) 
    4  *  
     4 * 
    55 * This program is free software: you can redistribute it and/or modify 
    66 * it under the terms of the GNU General Public License as published by 
    77 * the Free Software Foundation, either version 3 of the License, or 
    88 * (at your option) any later version. 
    9  *  
     9 * 
    1010 * This program is distributed in the hope that it will be useful, 
    1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
    1313 * GNU General Public License for more details. 
    14  *  
     14 * 
    1515 * You should have received a copy of the GNU General Public License 
    16  * along with this program.  If not, see <http://www.gnu.org/licenses/>. 
     16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 
    1717 */ 
    1818package cz.frantovo.xmlWebGenerator; 
    1919 
    2020import java.io.File; 
    21 import java.util.Date; 
    2221import java.net.URI; 
    2322import java.net.URISyntaxException; 
     23import java.util.Date; 
    2424 
    2525/** 
    2626 * Společná knihovna funkcí volaných z XSLT 
    27  *   
     27 * 
    2828 * @author František Kučera (frantovo.cz) 
    2929 */ 
     
    3232        /** 
    3333         * Zjištuje, kdy byl naposledy daný soubor změněn. 
     34         * 
    3435         * @param soubor cesta k souboru 
    3536         * @return datum poslední změny 
     
    4142                return new Date(f.lastModified()); 
    4243        } 
     44 
     45        public static String spojText(String[] kusyTextu) { 
     46                if (kusyTextu == null || kusyTextu.length < 1) { 
     47                        return null; 
     48                } else { 
     49                        StringBuilder sb = new StringBuilder(); 
     50                        for (int i = 0; i < kusyTextu.length; i++) { 
     51                                sb.append(kusyTextu[i]); 
     52                        } 
     53                        return sb.toString(); 
     54                } 
     55        } 
    4356} 
    44