# HG changeset patch # User František Kučera # Date 1402950517 -7200 # Node ID 3af3ef97f33f1c58a749adf3c9b7447959352fd3 # Parent bec481687c1b12b4487ecda4b5fff126e7760542 out-xslt: class skeletons diff -r bec481687c1b -r 3af3ef97f33f java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLI.java --- a/java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLI.java Mon Jun 16 22:15:18 2014 +0200 +++ b/java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLI.java Mon Jun 16 22:28:37 2014 +0200 @@ -52,7 +52,7 @@ for (ActionFactory f : ServiceLoader.load(ActionFactory.class)) { String code = f.getActionCode(); actionFactories.put(code, f); - log.log(Level.CONFIG, "Discovered output module: {0} = {1}", new Object[]{code, f.getClass().getName()}); + log.log(Level.INFO, "Discovered output module: {0} = {1}", new Object[]{code, f.getClass().getName()}); } ActionFactory actionFactory = actionFactories.get(actionCode); diff -r bec481687c1b -r 3af3ef97f33f java/alt2xml-out-xslt/config/META-INF.services/cz.frantovo.alt2xml.out.ActionFactory --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/alt2xml-out-xslt/config/META-INF.services/cz.frantovo.alt2xml.out.ActionFactory Mon Jun 16 22:28:37 2014 +0200 @@ -0,0 +1,1 @@ +cz.frantovo.alt2xml.out.xslt.XSLTActionFactory \ No newline at end of file diff -r bec481687c1b -r 3af3ef97f33f java/alt2xml-out-xslt/src/cz/frantovo/alt2xml/out/xslt/XSLTAction.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/alt2xml-out-xslt/src/cz/frantovo/alt2xml/out/xslt/XSLTAction.java Mon Jun 16 22:28:37 2014 +0200 @@ -0,0 +1,41 @@ +/** + * Alt2XML + * Copyright © 2014 František Kučera (frantovo.cz) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package cz.frantovo.alt2xml.out.xslt; + +import cz.frantovo.alt2xml.out.AbstractAction; +import cz.frantovo.alt2xml.out.ActionContext; +import cz.frantovo.alt2xml.out.OutputActionException; +import javax.xml.parsers.SAXParser; +import org.xml.sax.InputSource; + +/** + * + * @author Ing. František Kučera (frantovo.cz) + */ +public class XSLTAction extends AbstractAction { + + public XSLTAction(ActionContext actionContext) { + super(actionContext); + } + + @Override + public void run(SAXParser parser, InputSource source) throws OutputActionException { + // TODO: XSLT + throw new UnsupportedOperationException("Not supported yet."); + } +} diff -r bec481687c1b -r 3af3ef97f33f java/alt2xml-out-xslt/src/cz/frantovo/alt2xml/out/xslt/XSLTActionFactory.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/alt2xml-out-xslt/src/cz/frantovo/alt2xml/out/xslt/XSLTActionFactory.java Mon Jun 16 22:28:37 2014 +0200 @@ -0,0 +1,41 @@ +/** + * Alt2XML + * Copyright © 2014 František Kučera (frantovo.cz) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package cz.frantovo.alt2xml.out.xslt; + +import cz.frantovo.alt2xml.out.Action; +import cz.frantovo.alt2xml.out.ActionContext; +import cz.frantovo.alt2xml.out.ActionFactory; +import cz.frantovo.alt2xml.out.OutputActionException; + +/** + * Executes XPath expression and prints result. + * + * @author Ing. František Kučera (frantovo.cz) + */ +public class XSLTActionFactory implements ActionFactory { + + @Override + public String getActionCode() { + return "xslt"; + } + + @Override + public Action getAction(ActionContext context) throws OutputActionException { + return new XSLTAction(context); + } +}