1.1 --- a/java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLIOptions.java Wed Jul 09 00:20:49 2014 +0200
1.2 +++ b/java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLIOptions.java Wed Sep 03 15:50:16 2014 +0200
1.3 @@ -46,6 +46,10 @@
1.4
1.5 public void validate() throws InvalidOptionsException {
1.6 InvalidOptionsException e = new InvalidOptionsException();
1.7 +
1.8 + if (inputFile == null && systemId == null) {
1.9 + e.addProblem(new InvalidOptionsException.OptionProblem("Please specify also systemId when reading from a stream (like STDIN) instead of from a file."));
1.10 + }
1.11
1.12 /**
1.13 * TODO: validate
2.1 --- a/java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLIStarter.java Wed Jul 09 00:20:49 2014 +0200
2.2 +++ b/java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLIStarter.java Wed Sep 03 15:50:16 2014 +0200
2.3 @@ -58,6 +58,8 @@
2.4 try {
2.5 CLIParser cliParser = new CLIParser();
2.6 CLIOptions cliOptions = cliParser.parseOptions(args);
2.7 +
2.8 + cliOptions.validate();
2.9
2.10 Map<String, ActionFactory> actionFactories = new HashMap<>();
2.11