Ok, so I've made the CLI options override when set, and not override when not set. I think that CommandLineOption class needs a little TLC, we can use Commons CLI or some such library ( http://java-source.net/open-source/command-line). No point reinventing the wheel.
On 5 July 2012 08:27, Glenn Adams <[email protected]> wrote: > > On Thu, Jul 5, 2012 at 12:41 AM, mehdi houshmand <[email protected]>wrote: > >> Hi Chris/Glenn/Anyone else, >> >> You say command-line options should override the fop.xconf values, which >> makes sense. But should not-given command-line options override fop.xconf >> values too? Bare with me here, there is sense in the folly of that >> sentence. Ok, so let's take the example above, with strict FO validation, >> from the command line you have two options: >> >> 1) fop -r ... <other args> >> >> or >> >> 2) fop ... <other args> >> >> Obviously in option 1, you'd want strict FO validation to be invoked, >> regardless of what's in the fop conf. But how do we treat option 2? We're >> not explicitly telling it NOT to validate strictly, so how would a user >> expect FOP to behave? >> > > In the case of strict validation, if either configuration file or command > line option says do strict validation, then strict validation should apply. > We would need an option "don't do strict validation" in order to allow the > command line to override a configuration file saying to perform strict > validation. > >
