summaryrefslogtreecommitdiff
path: root/xsd/examples/cxx/tree/embedded/driver.cxx
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-23 15:21:29 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-23 15:21:29 +0200
commitbada6666c70977a058755ccf232e7d67b24adeed (patch)
tree1e92d50cebce96abaf9bce19e36026c47f77b9ba /xsd/examples/cxx/tree/embedded/driver.cxx
parenteaf34adcbd8095bc6d1f3371b1227f654c7b19fc (diff)
New upstream release
Diffstat (limited to 'xsd/examples/cxx/tree/embedded/driver.cxx')
-rw-r--r--xsd/examples/cxx/tree/embedded/driver.cxx41
1 files changed, 1 insertions, 40 deletions
diff --git a/xsd/examples/cxx/tree/embedded/driver.cxx b/xsd/examples/cxx/tree/embedded/driver.cxx
index 6e31d3b..5ceafa4 100644
--- a/xsd/examples/cxx/tree/embedded/driver.cxx
+++ b/xsd/examples/cxx/tree/embedded/driver.cxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/embedded/driver.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
#include <memory> // std::auto_ptr
@@ -12,11 +11,7 @@
#include <xercesc/validators/common/Grammar.hpp> // xercesc::Grammar
#include <xercesc/framework/Wrapper4InputSource.hpp>
-#if _XERCES_VERSION >= 30000
-# include <xercesc/framework/XMLGrammarPoolImpl.hpp>
-#else
-# include <xercesc/internal/XMLGrammarPoolImpl.hpp>
-#endif
+#include <xercesc/framework/XMLGrammarPoolImpl.hpp>
#include <xsd/cxx/xml/string.hxx>
#include <xsd/cxx/xml/dom/auto-ptr.hxx>
@@ -86,10 +81,6 @@ main (int argc, char* argv[])
DOMImplementation* impl (
DOMImplementationRegistry::getDOMImplementation (ls_id));
-#if _XERCES_VERSION >= 30000
-
- // Xerces-C++ 3.0.0 and later.
- //
xml::dom::auto_ptr<DOMLSParser> parser (
impl->createLSParser (
DOMImplementationLS::MODE_SYNCHRONOUS, 0, mm, gp.get ()));
@@ -150,32 +141,6 @@ main (int argc, char* argv[])
xml::dom::bits::error_handler_proxy<char> ehp (eh);
conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
-#else // _XERCES_VERSION >= 30000
-
- // Same as above but for Xerces-C++ 2 series.
- //
- xml::dom::auto_ptr<DOMBuilder> parser (
- impl->createDOMBuilder(
- DOMImplementationLS::MODE_SYNCHRONOUS, 0, mm, gp.get ()));
-
-
- parser->setFeature (XMLUni::fgDOMComments, false);
- parser->setFeature (XMLUni::fgDOMDatatypeNormalization, true);
- parser->setFeature (XMLUni::fgDOMEntities, false);
- parser->setFeature (XMLUni::fgDOMNamespaces, true);
- parser->setFeature (XMLUni::fgDOMWhitespaceInElementContent, false);
- parser->setFeature (XMLUni::fgDOMValidation, true);
- parser->setFeature (XMLUni::fgXercesSchema, true);
- parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
- parser->setFeature (XMLUni::fgXercesUseCachedGrammarInParse, true);
- parser->setFeature (XMLUni::fgXercesUserAdoptsDOMDocument, true);
-
- tree::error_handler<char> eh;
- xml::dom::bits::error_handler_proxy<char> ehp (eh);
- parser->setErrorHandler (&ehp);
-
-#endif // _XERCES_VERSION >= 30000
-
// Parse XML documents.
//
for (unsigned long i (0); i < 10; ++i)
@@ -191,11 +156,7 @@ main (int argc, char* argv[])
// Parse XML to DOM.
//
-#if _XERCES_VERSION >= 30000
xml_schema::dom::auto_ptr<DOMDocument> doc (parser->parse (&wrap));
-#else
- xml_schema::dom::auto_ptr<DOMDocument> doc (parser->parse (wrap));
-#endif
eh.throw_if_failed<xml_schema::parsing> ();