Examples of XhtmlStruct


Examples of org.pirkaengine.core.parser.XhtmlStruct

            FileNotFoundException {
        if (file == null) throw new IllegalArgumentException("file is null.");
        if (isDebugEnabled()) debug("build: " + file.getAbsolutePath());
        XhtmlTemplate template = new XhtmlTemplate(templateName);
        template.setTimeStamp(file.lastModified());
        XhtmlStruct struct = parse(file, charset);
        // extendsの処理
        if (struct.getBaseTemplate() != null) {
            try {
                // 継承テンプレート
                // block部分を抽出する(this.blocksに格納される)
                XhtmlTemplate subTemplate = new XhtmlTemplate(templateName);
                buildTemplate(subTemplate, struct, null, charset);
                // TODO 相対パスの解決
                File baseFile = loader.toFile(struct.getBaseTemplate(), templateName);
                // ベースのテンプレート
                XhtmlStruct baseStruct = parse(baseFile, charset);
                buildTemplate(template, baseStruct, blocks, charset);
                template.components.addAll(subTemplate.components);
                for (String name : subTemplate.functions.keySet()) {
                    template.functions.put(name, subTemplate.functions.get(name));
                }
View Full Code Here

Examples of org.pirkaengine.core.parser.XhtmlStruct

                // prk: include
                // TODO 相対パスの解決
                try {
                    XhtmlTemplate includeTemplate = new XhtmlTemplate(fragment.prkValue);
                    File includeFile = loader.toFile(fragment.prkValue, template.templateName);
                    XhtmlStruct includeStruct = parse(includeFile, charset);
                    buildTemplate(includeTemplate, includeStruct, null, charset);
                    // IncludeNode node = new IncludeNode(includeTemplate);
                    // template.stack(node);
                    template.components.addAll(includeTemplate.components);
                    for (String name : includeTemplate.functions.keySet()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.