aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-11-25 10:48:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-11-25 10:48:20 +0200
commite8c564ba614889b0aa80fae0f66ee932f87decb0 (patch)
tree386fd15926e437b9293ca64b096c61b85ffd156e /examples
parent146ab861b7e9a648460314eab42378bbe27caf14 (diff)
Disable loading of external schemas
Diffstat (limited to 'examples')
-rw-r--r--examples/cxx/parser/performance/driver.cxx4
-rw-r--r--examples/cxx/tree/caching/driver.cxx7
-rw-r--r--examples/cxx/tree/performance/parsing.cxx1
3 files changed, 12 insertions, 0 deletions
diff --git a/examples/cxx/parser/performance/driver.cxx b/examples/cxx/parser/performance/driver.cxx
index da54aaa..4efafdb 100644
--- a/examples/cxx/parser/performance/driver.cxx
+++ b/examples/cxx/parser/performance/driver.cxx
@@ -255,6 +255,10 @@ main (int argc, char* argv[])
eh.throw_if_failed ();
parser->setFeature (XMLUni::fgXercesUseCachedGrammarInParse, true);
+
+#if _XERCES_VERSION >= 30000
+ parser->setFeature (XMLUni::fgXercesLoadSchema, false);
+#endif
}
else
{
diff --git a/examples/cxx/tree/caching/driver.cxx b/examples/cxx/tree/caching/driver.cxx
index 0a811e4..a3877d8 100644
--- a/examples/cxx/tree/caching/driver.cxx
+++ b/examples/cxx/tree/caching/driver.cxx
@@ -115,8 +115,15 @@ main (int argc, char* argv[])
}
eh.throw_if_failed<xml_schema::parsing> ();
+
+ // Use the loaded grammar during parsing.
+ //
conf->setParameter (XMLUni::fgXercesUseCachedGrammarInParse, true);
+ // Disable loading schemas via other means (e.g., schemaLocation).
+ //
+ conf->setParameter (XMLUni::fgXercesLoadSchema, false);
+
// 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 b7413a7..f68b57c 100644
--- a/examples/cxx/tree/performance/parsing.cxx
+++ b/examples/cxx/tree/performance/parsing.cxx
@@ -111,6 +111,7 @@ parsing (const char* file, unsigned long iter, bool validate)
eh.throw_if_failed<xml_schema::parsing> ();
conf->setParameter (XMLUni::fgXercesUseCachedGrammarInParse, true);
+ conf->setParameter (XMLUni::fgXercesLoadSchema, false);
}
else
{