diff options
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/fop/apps/FopConfParser.java | 14 | ||||
-rw-r--r-- | src/java/org/apache/fop/cli/CommandLineOptions.java | 5 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/apps/FopConfParser.java b/src/java/org/apache/fop/apps/FopConfParser.java index bf39a53f0..c6e3dbd19 100644 --- a/src/java/org/apache/fop/apps/FopConfParser.java +++ b/src/java/org/apache/fop/apps/FopConfParser.java @@ -142,12 +142,20 @@ public class FopConfParser { log.debug("Initializing FopFactory Configuration"); } - // TODO: This makes this variable both strict FO and user-config validation, is that right? - boolean strict = false; // strict fo validation if (cfg.getChild("strict-validation", false) != null) { try { - strict = cfg.getChild("strict-validation").getValueAsBoolean(); + boolean strict = cfg.getChild("strict-validation").getValueAsBoolean(); + fopFactoryBuilder.setStrictFOValidation(strict); + } catch (ConfigurationException e) { + LogUtil.handleException(log, e, false); + } + } + + boolean strict = false; + if (cfg.getChild("strict-configuration", false) != null) { + try { + strict = cfg.getChild("strict-configuration").getValueAsBoolean(); fopFactoryBuilder.setStrictUserConfigValidation(strict); } catch (ConfigurationException e) { LogUtil.handleException(log, e, false); diff --git a/src/java/org/apache/fop/cli/CommandLineOptions.java b/src/java/org/apache/fop/cli/CommandLineOptions.java index aa402aa6a..5a770c3ba 100644 --- a/src/java/org/apache/fop/cli/CommandLineOptions.java +++ b/src/java/org/apache/fop/cli/CommandLineOptions.java @@ -1031,14 +1031,15 @@ public class CommandLineOptions { FopFactoryBuilder fopFactoryBuilder; if (userConfigFile == null) { fopFactoryBuilder = new FopFactoryBuilder(new File(".").toURI()); + fopFactoryBuilder.setStrictFOValidation(strictValidation); + fopFactoryBuilder.setTargetResolution(targetResolution); + fopFactoryBuilder.setComplexScriptFeatures(useComplexScriptFeatures); } else { try { fopFactoryBuilder = new FopConfParser(userConfigFile).getFopFactoryBuilder(); } catch (SAXException e) { throw new FOPException(e); } - fopFactoryBuilder.setStrictFOValidation(strictValidation); - fopFactoryBuilder.setComplexScriptFeatures(useComplexScriptFeatures); } factory = fopFactoryBuilder.build(); } |