From f2ec36ab5fa04e11dee655d9c623baac95db1eba Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 13 Nov 2013 07:46:45 +0200 Subject: Drop support for Xerces-C++ 2-series --- examples/cxx/tree/caching/driver.cxx | 43 ------------------------------------ 1 file changed, 43 deletions(-) (limited to 'examples/cxx/tree/caching') diff --git a/examples/cxx/tree/caching/driver.cxx b/examples/cxx/tree/caching/driver.cxx index a3877d8..d4f5ff7 100644 --- a/examples/cxx/tree/caching/driver.cxx +++ b/examples/cxx/tree/caching/driver.cxx @@ -51,10 +51,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 +124,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 +139,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.1