dbertoni    00/06/25 17:42:24

  Modified:    c/src/TestXSLT process.cpp
  Log:
  Fixed problem were not supplying stylesheet would cause a crash.  Updated the 
version number.
  
  Revision  Changes    Path
  1.23      +13 -5     xml-xalan/c/src/TestXSLT/process.cpp
  
  Index: process.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/TestXSLT/process.cpp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- process.cpp       2000/06/17 21:15:24     1.22
  +++ process.cpp       2000/06/26 00:42:23     1.23
  @@ -126,7 +126,6 @@
   #include <XSLT/XSLTProcessorEnvSupportDefault.hpp>
   
   
  -
   //#define XALAN_USE_ICU
   #if defined(XALAN_USE_ICU)
   #include <ICUBridge/ICUBridge.hpp>
  @@ -680,8 +679,6 @@
                XercesDOMPrintWriter    resultWriter(*outputStream);
   
   
  -             assert(0 != stylesheet);
  -
                if(FormatterListener::OUTPUT_METHOD_XML == outputType)
                {
                        FormatterToXML* fToXML = new 
FormatterToXML(resultWriter,
  @@ -733,8 +730,19 @@
                        rTreeTarget->setFormatterListener(formatter);
                        xmlParserLiaison.setFormatterListener(formatter);
                }
  +
  +             if (stylesheet != 0)
  +             {
  +                     theExecutionContext.setStylesheetRoot(stylesheet);
  +             }
  +
  +             XSLTInputSource         theSourceTree(sourceTree);
  +
  +             processor.process(
  +                     theSourceTree,
  +                     *rTreeTarget,
  +                     theExecutionContext);
   
  -             stylesheet->process(sourceTree, *rTreeTarget, 
theExecutionContext);
                delete formatter;
                delete rTreeTarget;
        }
  @@ -771,7 +779,7 @@
   
                if (theParams.versionOnly == true)
                {
  -                     cout << "TestXSLT version 0.40.0 (Xalan C++ version 
0.40.0)"
  +                     cout << "TestXSLT version 0.31.0 (Xalan C++ version 
0.31.0)"
                                 << endl;
                }
                else if (theParams.inFileNames.size() == 0)
  
  
  

Reply via email to