From 526bf2f83c85fb4fb2376da79662c37e0d24a84f Mon Sep 17 00:00:00 2001
From: Rahul Jain <rahulj@apache.org>
Date: Fri, 16 Jun 2000 20:25:43 +0000
Subject: [PATCH] Add the -v=always option to force validation checking. Need
 this option for running the conformance tests.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@172172 13f79535-47bb-0310-9956-ffa450edef68
---
 samples/DOMCount/DOMCount.cpp | 8 +++++++-
 samples/DOMPrint/DOMPrint.cpp | 4 +++-
 samples/SAXCount/SAXCount.cpp | 8 +++++++-
 samples/SAXPrint/SAXPrint.cpp | 8 +++++++-
 4 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/samples/DOMCount/DOMCount.cpp b/samples/DOMCount/DOMCount.cpp
index c028e4553..ec8955c5f 100644
--- a/samples/DOMCount/DOMCount.cpp
+++ b/samples/DOMCount/DOMCount.cpp
@@ -56,6 +56,10 @@
 
 /*
  * $Log$
+ * Revision 1.8  2000/06/16 20:25:23  rahulj
+ * Add the -v=always option to force validation checking. Need this
+ * option for running the conformance tests.
+ *
  * Revision 1.7  2000/05/31 18:42:31  rahulj
  * 'Auto' validation is the default processing mode.
  *
@@ -114,7 +118,7 @@ void usage()
             "the DOM tree, and then prints the number of elements\n"
             "found in the input XML file.\n\n"
             "Options:\n"
-            "    -v=xxx      Validation scheme [never | auto*]\n"
+            "    -v=xxx      Validation scheme [always | never | auto*]\n"
             "    -n          Enable namespace processing. Defaults to off.\n\n"
             "  * = Default if not provided explicitly\n\n"
          << endl;
@@ -170,6 +174,8 @@ int main(int argC, char* argV[])
                 valScheme = DOMParser::Val_Never;
             else if (!strcmp(parm, "auto"))
                 valScheme = DOMParser::Val_Auto;
+            else if (!strcmp(parm, "always"))
+                valScheme = DOMParser::Val_Always;
             else
             {
                 cerr << "Unknown -v= value: " << parm << endl;
diff --git a/samples/DOMPrint/DOMPrint.cpp b/samples/DOMPrint/DOMPrint.cpp
index 55f50fef5..236553455 100644
--- a/samples/DOMPrint/DOMPrint.cpp
+++ b/samples/DOMPrint/DOMPrint.cpp
@@ -262,7 +262,7 @@ void usage()
             "Options:\n"
             "    -e          Expand entity references. Default is no expansion.\n"
             "    -u=xxx      Handle unrepresentable chars [fail | rep | ref*]\n"
-            "    -v=xxx      Validation scheme [never | auto*]\n"
+            "    -v=xxx      Validation scheme [always | never | auto*]\n"
             "    -n          Enable namespace processing. Default is off.\n"
             "    -x=XXX      Use a particular encoding for output. Default is\n"
             "                the same encoding as the input XML file. UTF-8 if\n"
@@ -333,6 +333,8 @@ int main(int argC, char* argV[])
                 gValScheme = DOMParser::Val_Never;
             else if (!strcmp(parm, "auto"))
                 gValScheme = DOMParser::Val_Auto;
+            else if (!strcmp(parm, "always"))
+                gValScheme = DOMParser::Val_Always;
             else
             {
                 cerr << "Unknown -v= value: " << parm << endl;
diff --git a/samples/SAXCount/SAXCount.cpp b/samples/SAXCount/SAXCount.cpp
index cb00255d6..0270f9a8d 100644
--- a/samples/SAXCount/SAXCount.cpp
+++ b/samples/SAXCount/SAXCount.cpp
@@ -56,6 +56,10 @@
 
 /*
 * $Log$
+* Revision 1.8  2000/06/16 20:25:38  rahulj
+* Add the -v=always option to force validation checking. Need this
+* option for running the conformance tests.
+*
 * Revision 1.7  2000/05/31 18:39:59  rahulj
 * 'Auto' validation is the default processing mode.
 *
@@ -105,7 +109,7 @@ void usage()
     cout << "\nUsage:\n"
             "    SAXCount [options] <XML file>\n\n"
             "Options:\n"
-            "    -v=xxx      Validation scheme [never | auto*]\n"
+            "    -v=xxx      Validation scheme [always | never | auto*]\n"
             "    -n          Enable namespace processing. Defaults to off.\n\n"
             "This program prints the number of elements, attributes,\n"
             "white spaces and other non-white space characters in the "
@@ -169,6 +173,8 @@ int main(int argC, char* argV[])
                 valScheme = SAXParser::Val_Never;
             else if (!strcmp(parm, "auto"))
                 valScheme = SAXParser::Val_Auto;
+            else if (!strcmp(parm, "always"))
+                valScheme = SAXParser::Val_Always;
             else
             {
                 cerr << "Unknown -v= value: " << parm << endl;
diff --git a/samples/SAXPrint/SAXPrint.cpp b/samples/SAXPrint/SAXPrint.cpp
index 4b670a955..1b713cd9d 100644
--- a/samples/SAXPrint/SAXPrint.cpp
+++ b/samples/SAXPrint/SAXPrint.cpp
@@ -56,6 +56,10 @@
 
 /*
  * $Log$
+ * Revision 1.12  2000/06/16 20:25:43  rahulj
+ * Add the -v=always option to force validation checking. Need this
+ * option for running the conformance tests.
+ *
  * Revision 1.11  2000/05/31 18:36:26  rahulj
  * Matched the command line options supported by DOMPrint.
  *
@@ -149,7 +153,7 @@ static void usage()
              "sensitive.\n\n"
              "Options:\n"
              "    -u=xxx      Handle unrepresentable chars [fail | rep | ref*]\n"
-             "    -v=xxx      Validation scheme [never | auto*]\n"
+             "    -v=xxx      Validation scheme [always | never | auto*]\n"
              "    -n          Enable namespace processing.\n"
              "    -x=XXX      Use a particular encoding for output (LATIN1*).\n"
              "    -?          Show this help\n\n"
@@ -212,6 +216,8 @@ int main(int argC, char* argV[])
                 valScheme = SAXParser::Val_Never;
             else if (!strcmp(parm, "auto"))
                 valScheme = SAXParser::Val_Auto;
+            else if (!strcmp(parm, "always"))
+                valScheme = SAXParser::Val_Always;
             else
             {
                 cerr << "Unknown -v= value: " << parm << endl;
-- 
GitLab