From 8286ac511144e4f17d34eac9affb97e50646344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:25:44 +0200 Subject: Imported Upstream version 4.0.0 --- xsd/examples/cxx/tree/caching/driver.cxx | 44 -------------------------------- 1 file changed, 44 deletions(-) (limited to 'xsd/examples/cxx/tree/caching/driver.cxx') diff --git a/xsd/examples/cxx/tree/caching/driver.cxx b/xsd/examples/cxx/tree/caching/driver.cxx index a3877d8..2aa9396 100644 --- a/xsd/examples/cxx/tree/caching/driver.cxx +++ b/xsd/examples/cxx/tree/caching/driver.cxx @@ -1,5 +1,4 @@ // file : examples/cxx/tree/caching/driver.cxx -// author : Boris Kolpackov // copyright : not copyrighted - public domain #include // std::auto_ptr @@ -51,10 +50,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 parser ( impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0)); @@ -128,41 +123,6 @@ main (int argc, char* argv[]) // conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true); -#else // _XERCES_VERSION >= 30000 - - // Same as above but for Xerces-C++ 2 series. - // - xml::dom::auto_ptr parser ( - impl->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0)); - - - 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); - - tree::error_handler eh; - xml::dom::bits::error_handler_proxy ehp (eh); - parser->setErrorHandler (&ehp); - - if (!parser->loadGrammar ("library.xsd", Grammar::SchemaGrammarType, true)) - { - eh.handle ("library.xsd", 0, 0, - tree::error_handler::severity::fatal, - "unable to load schema"); - } - - eh.throw_if_failed (); - parser->setFeature (XMLUni::fgXercesUseCachedGrammarInParse, true); - - parser->setFeature (XMLUni::fgXercesUserAdoptsDOMDocument, true); - -#endif // _XERCES_VERSION >= 30000 - // Parse XML documents. // for (unsigned long i (0); i < 10; ++i) @@ -178,11 +138,7 @@ main (int argc, char* argv[]) // Parse XML to DOM. // -#if _XERCES_VERSION >= 30000 xml_schema::dom::auto_ptr doc (parser->parse (&wrap)); -#else - xml_schema::dom::auto_ptr doc (parser->parse (wrap)); -#endif eh.throw_if_failed (); -- cgit v1.2.3