dbertoni    2003/04/24 09:33:16

  Modified:    c/Tests/Dom2Dom dom2dom.cpp
  Log:
  Updated to use appropriate XSLTResultTarget constructor.
  
  Revision  Changes    Path
  1.9       +15 -4     xml-xalan/c/Tests/Dom2Dom/dom2dom.cpp
  
  Index: dom2dom.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/Tests/Dom2Dom/dom2dom.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- dom2dom.cpp       27 Nov 2002 22:36:27 -0000      1.8
  +++ dom2dom.cpp       24 Apr 2003 16:33:16 -0000      1.9
  @@ -74,6 +74,8 @@
   
   
   
  +#include <xercesc/dom/DOMDocument.hpp>
  +#include <xercesc/dom/DOMImplementation.hpp>
   #include <xercesc/sax/SAXException.hpp>
   #include <xercesc/util/PlatformUtils.hpp>
   
  @@ -105,6 +107,8 @@
   
   
   
  +#include <XercesParserLiaison/FormatterToXercesDOM.hpp>
  +#include <XercesParserLiaison/XercesDOMFormatterWalker.hpp>
   #include <XercesParserLiaison/XercesDOMSupport.hpp>
   #include <XercesParserLiaison/XercesParserLiaison.hpp>
   
  @@ -323,9 +327,16 @@
                                const XalanDOMString  theOutput =  outputRoot + 
xMan + FileUtility::s_pathSep + files[i]; 
                                const XalanDOMString  theOutputFile = 
f.generateFileName(theOutput, "out");
   
  +                             XALAN_USING_XERCES(DOMDocument)
  +                             XALAN_USING_XERCES(DOMImplementation)
  +
                                // Use a Xerces Dom document to create the 
XSLTResultTarget. 
  -                             XalanDocument* domOut = 
parserLiaison.createDocument();
  -                             const XSLTResultTarget domResultTarget(domOut);
  +                             const XalanAutoPtr<DOMDocument>         
theDocument(DOMImplementation::getImplementation()->createDocument());
  +                             assert(theDocument.get() != 0);
  +
  +                             FormatterToXercesDOM    
theFormatter(theDocument.get(), 0);
  +
  +                             XSLTResultTarget        
domResultTarget(theFormatter);
   
                                const XSLTInputSource   
xslInputSource(theXSLFile);
                                const XSLTInputSource   
xmlInputSource(theXMLFile);
  @@ -364,8 +375,8 @@
                                                                                
                                                                mimeEncoding,
                                                                                
                                                                
compiledSS->getStylesheetRoot());
   
  -                                             FormatterTreeWalker 
theTreeWalker(*theFormatter);
  -                                             theTreeWalker.traverse(domOut);
  +                                             XercesDOMFormatterWalker 
theTreeWalker(*theFormatter);
  +                                             
theTreeWalker.traverse(theDocument.get());
   
                                                delete theFormatter;
                                                
logFile.logTestCaseClose("Done","Pass");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to