From: Glen Mazza Date: Sat, 23 Apr 2005 02:45:28 +0000 (+0000) Subject: Setting default validation to "strict"; adding a command line -r option X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5eca263327d60b184fbcfe9bfc9664f5aa404112;p=xmlgraphics-fop.git Setting default validation to "strict"; adding a command line -r option to use relaxed validation. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_KnuthStylePageBreaking@198590 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/apps/CommandLineOptions.java b/src/java/org/apache/fop/apps/CommandLineOptions.java index 42609311a..edd0d8e5e 100644 --- a/src/java/org/apache/fop/apps/CommandLineOptions.java +++ b/src/java/org/apache/fop/apps/CommandLineOptions.java @@ -149,6 +149,8 @@ public class CommandLineOptions implements Constants { suppressLowLevelAreas = Boolean.TRUE; } else if (args[i].equals("-d")) { setLogLevel("debug"); + } else if (args[i].equals("-r")) { + foUserAgent.setStrictValidation(false); } else if (args[i].equals("-q") || args[i].equals("--quiet")) { setLogLevel("error"); } else if (args[i].equals("-fo")) { @@ -612,6 +614,7 @@ public class CommandLineOptions implements Constants { + " -q quiet mode \n" + " -c cfg.xml use additional configuration file cfg.xml\n" + " -l lang the language to use for user information \n" + + " -r relaxed/less strict validation (where available)\n" + " -s for area tree XML, down to block areas only\n" + " -v to show FOP version being used\n\n" + " [INPUT] \n" diff --git a/src/java/org/apache/fop/apps/FOUserAgent.java b/src/java/org/apache/fop/apps/FOUserAgent.java index df263149c..d15b5d735 100644 --- a/src/java/org/apache/fop/apps/FOUserAgent.java +++ b/src/java/org/apache/fop/apps/FOUserAgent.java @@ -85,7 +85,7 @@ public class FOUserAgent { * behavior for FOP. However, this flag, if set, provides the user the * ability for FOP to halt on all content model violations if desired. */ - private boolean strictValidation = false; + private boolean strictValidation = true; /* Additional fo.ElementMapping subclasses set by user */ private ArrayList additionalElementMappings = null;