aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-11-05 06:49:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-11-05 06:49:41 +0200
commit9878dfe26a08ea5638c562c22c9becd11d462015 (patch)
tree482b77889d4bc7e82bdc600e85450aa2edf21e43 /examples
parentfccba6f6bc4c3960473423656563045dcc6c2067 (diff)
Enable multiple import support for Xerces-C++ 3.1.0 or later
Diffstat (limited to 'examples')
-rw-r--r--examples/cxx/parser/performance/driver.cxx7
-rw-r--r--examples/cxx/tree/caching/driver.cxx9
-rw-r--r--examples/cxx/tree/custom/comments/dom-parse.cxx7
-rw-r--r--examples/cxx/tree/messaging/dom-parse.cxx7
-rw-r--r--examples/cxx/tree/multiroot/dom-parse.cxx7
-rw-r--r--examples/cxx/tree/performance/parsing.cxx7
-rw-r--r--examples/cxx/tree/streaming/parser.cxx7
-rw-r--r--examples/cxx/tree/xpath/dom-parse.cxx7
8 files changed, 57 insertions, 1 deletions
diff --git a/examples/cxx/parser/performance/driver.cxx b/examples/cxx/parser/performance/driver.cxx
index 9e1d48d..0fe2f02 100644
--- a/examples/cxx/parser/performance/driver.cxx
+++ b/examples/cxx/parser/performance/driver.cxx
@@ -222,6 +222,13 @@ main (int argc, char* argv[])
parser->setFeature (XMLUni::fgXercesSchema, true);
parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ parser->setFeature (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
parser->loadGrammar ("test.xsd", Grammar::SchemaGrammarType, true);
parser->setFeature (XMLUni::fgXercesUseCachedGrammarInParse, true);
}
diff --git a/examples/cxx/tree/caching/driver.cxx b/examples/cxx/tree/caching/driver.cxx
index 5c3405a..015606f 100644
--- a/examples/cxx/tree/caching/driver.cxx
+++ b/examples/cxx/tree/caching/driver.cxx
@@ -84,12 +84,19 @@ main (int argc, char* argv[])
//
conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
- // Enable/Disable validation.
+ // Enable validation.
//
conf->setParameter (XMLUni::fgDOMValidate, true);
conf->setParameter (XMLUni::fgXercesSchema, true);
conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
// Set error handler.
//
tree::error_handler<char> eh;
diff --git a/examples/cxx/tree/custom/comments/dom-parse.cxx b/examples/cxx/tree/custom/comments/dom-parse.cxx
index 7ad6aa5..1ba62e5 100644
--- a/examples/cxx/tree/custom/comments/dom-parse.cxx
+++ b/examples/cxx/tree/custom/comments/dom-parse.cxx
@@ -68,6 +68,13 @@ parse (std::istream& is, const std::string& id, bool validate)
conf->setParameter (XMLUni::fgXercesSchema, validate);
conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
// We will release the DOM document ourselves.
//
conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
diff --git a/examples/cxx/tree/messaging/dom-parse.cxx b/examples/cxx/tree/messaging/dom-parse.cxx
index d6ce204..e4bc6cc 100644
--- a/examples/cxx/tree/messaging/dom-parse.cxx
+++ b/examples/cxx/tree/messaging/dom-parse.cxx
@@ -68,6 +68,13 @@ parse (std::istream& is, const std::string& id, bool validate)
conf->setParameter (XMLUni::fgXercesSchema, validate);
conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
// We will release the DOM document ourselves.
//
conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
diff --git a/examples/cxx/tree/multiroot/dom-parse.cxx b/examples/cxx/tree/multiroot/dom-parse.cxx
index 3a67626..2b57be0 100644
--- a/examples/cxx/tree/multiroot/dom-parse.cxx
+++ b/examples/cxx/tree/multiroot/dom-parse.cxx
@@ -68,6 +68,13 @@ parse (std::istream& is, const std::string& id, bool validate)
conf->setParameter (XMLUni::fgXercesSchema, validate);
conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
// We will release the DOM document ourselves.
//
conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
diff --git a/examples/cxx/tree/performance/parsing.cxx b/examples/cxx/tree/performance/parsing.cxx
index fd27fb2..3997ea6 100644
--- a/examples/cxx/tree/performance/parsing.cxx
+++ b/examples/cxx/tree/performance/parsing.cxx
@@ -90,6 +90,13 @@ parsing (const char* file, unsigned long iter, bool validate)
conf->setParameter (XMLUni::fgXercesSchema, true);
conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
// If we are validating, pre-load and cache the schema.
//
parser->loadGrammar ("test.xsd", Grammar::SchemaGrammarType, true);
diff --git a/examples/cxx/tree/streaming/parser.cxx b/examples/cxx/tree/streaming/parser.cxx
index 1a0fa73..77fc6cc 100644
--- a/examples/cxx/tree/streaming/parser.cxx
+++ b/examples/cxx/tree/streaming/parser.cxx
@@ -99,6 +99,13 @@ parser_impl ()
parser_->setFeature (XMLUni::fgXercesValidationErrorAsFatal, true);
parser_->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ parser_->setFeature (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
parser_->setErrorHandler (&error_proxy_);
parser_->setContentHandler (this);
}
diff --git a/examples/cxx/tree/xpath/dom-parse.cxx b/examples/cxx/tree/xpath/dom-parse.cxx
index 84ff0af..82e87b6 100644
--- a/examples/cxx/tree/xpath/dom-parse.cxx
+++ b/examples/cxx/tree/xpath/dom-parse.cxx
@@ -63,6 +63,13 @@ parse (std::istream& is,
conf->setParameter (XMLUni::fgXercesSchema, validate);
conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
// We will release the DOM document ourselves.
//
conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);