cli: utility option --reader-namespace-aware (shortcut for "http://xml.org/sax/features/namespaces" feature)
1.1 --- a/java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLIParser.java Wed Sep 17 21:00:32 2014 +0200
1.2 +++ b/java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLIParser.java Wed Sep 17 21:06:56 2014 +0200
1.3 @@ -110,6 +110,15 @@
1.4 return index - originalIndex;
1.5 }
1.6 },
1.7 + READER_NAMESPACE_AWARE("--reader-namespace-aware") {
1.8 + @Override
1.9 + public int parse(String[] args, int index, CLIOptions options) throws CLIParserException {
1.10 + int originalIndex = index;
1.11 + String value = fetchNext(args, ++index);
1.12 + options.addReaderFeature(Constants.SAX_PARSER_NAMESPACE_AWARE, Boolean.valueOf(value));
1.13 + return index - originalIndex;
1.14 + }
1.15 + },
1.16 ACTION("--action") {
1.17 @Override
1.18 public int parse(String[] args, int index, CLIOptions options) throws CLIParserException {
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/Constants.java Wed Sep 17 21:06:56 2014 +0200
2.3 @@ -0,0 +1,32 @@
2.4 +/**
2.5 + * Alt2XML
2.6 + * Copyright © 2014 František Kučera (frantovo.cz)
2.7 + *
2.8 + * This program is free software: you can redistribute it and/or modify
2.9 + * it under the terms of the GNU General Public License as published by
2.10 + * the Free Software Foundation, either version 3 of the License, or
2.11 + * (at your option) any later version.
2.12 + *
2.13 + * This program is distributed in the hope that it will be useful,
2.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2.16 + * GNU General Public License for more details.
2.17 + *
2.18 + * You should have received a copy of the GNU General Public License
2.19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
2.20 + */
2.21 +package cz.frantovo.alt2xml.cli;
2.22 +
2.23 +/**
2.24 + * Common constants
2.25 + *
2.26 + * @author Ing. František Kučera (frantovo.cz)
2.27 + */
2.28 +public class Constants {
2.29 +
2.30 + public static final String SAX_PARSER_NAMESPACE_AWARE = "http://xml.org/sax/features/namespaces";
2.31 +
2.32 + private Constants() {
2.33 + }
2.34 +
2.35 +}