You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2002/11/26 03:12:22 UTC

cvs commit: xml-xalan/c/Tests/Conf conf.cpp

dbertoni    2002/11/25 18:12:22

  Modified:    c/Tests/Conf conf.cpp
  Log:
  Updates for C++ namespace support.
  
  Revision  Changes    Path
  1.30      +18 -15    xml-xalan/c/Tests/Conf/conf.cpp
  
  Index: conf.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/Tests/Conf/conf.cpp,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- conf.cpp	14 Nov 2002 23:53:39 -0000	1.29
  +++ conf.cpp	26 Nov 2002 02:12:22 -0000	1.30
  @@ -63,7 +63,8 @@
   
   #include <cstdio>
   
  -#if !defined(XALAN_NO_NAMESPACES)
  +
  +#if !defined(XALAN_NO_STD_NAMESPACE)
   	using std::cerr;
   	using std::cout;
   	using std::cin;
  @@ -77,11 +78,8 @@
   
   
   
  -#if XERCES_VERSION_MAJOR >= 2
  -#include <xercesc/dom/deprecated/DOMParser.hpp>
  -#else
  -#include <xercesc/parsers/DOMParser.hpp>
  -#endif
  +#include <xercesc/parsers/XercesDOMParser.hpp>
  +
   
   
   #include <XercesParserLiaison/XercesParserLiaison.hpp>
  @@ -99,11 +97,12 @@
   #include <Harness/FileUtility.hpp>
   #include <Harness/HarnessInit.hpp>
   
  -#if defined(XALAN_NO_NAMESPACES)
  -	typedef map<XalanDOMString, XalanDOMString, less<XalanDOMString> >	Hashtable;
  -#else
  -	typedef std::map<XalanDOMString, XalanDOMString>  Hashtable;
  -#endif
  +
  +
  +// Just hoist everything...
  +XALAN_CPP_NAMESPACE_USE
  +
  +
   
   // This is here for memory leak testing. 
   #if !defined(NDEBUG) && defined(_MSC_VER)
  @@ -211,19 +210,21 @@
   			XMLFileReporter&				logFile,
   			FileUtility&					h)
   {
  +	XALAN_USING_XERCES(XercesDOMParser)
  +	XALAN_USING_XERCES(DOMDocument)
   
   	h.data.xmlFormat = XalanDOMString("Xerces_DOM");
   
  -	DOMParser  theParser;
  -	theParser.setToCreateXMLDeclTypeNode(false);
  +	XercesDOMParser  theParser;
  +
   	theParser.setDoValidation(true);
   	theParser.setDoNamespaces(true);
   
   	theParser.parse(xmlInput);
   
  -	DOM_Document theDOM = theParser.getDocument();
  +	DOMDocument* const theDOM = theParser.getDocument();
   
  -	theDOM.normalize();
  +	theDOM->normalize();
   
   	XercesDOMSupport	theDOMSupport;
   	XercesParserLiaison theParserLiaison;
  @@ -421,6 +422,8 @@
   
   	try
   	{
  +		XALAN_USING_XERCES(XMLPlatformUtils)
  +
   		// Call the static initializers for xerces and xalan, and create a transformer
   		//
   		XMLPlatformUtils::Initialize();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org