dbertoni    01/06/21 08:37:37

  Modified:    c/samples/ThreadSafe ThreadSafe.cpp
  Log:
  Changes for new XalanTransformer interfaces.
  
  Revision  Changes    Path
  1.16      +8 -4      xml-xalan/c/samples/ThreadSafe/ThreadSafe.cpp
  
  Index: ThreadSafe.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/samples/ThreadSafe/ThreadSafe.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ThreadSafe.cpp    2001/06/07 14:54:49     1.15
  +++ ThreadSafe.cpp    2001/06/21 15:37:35     1.16
  @@ -184,9 +184,9 @@
                        // pre-parsed source.
                        XalanTransformer        theXalanTransformer;
   
  -                     glbCompiledStylesheet = 
theXalanTransformer.compileStylesheet("birds.xsl");
  +                     glbError = theXalanTransformer.compileStylesheet("birds.xsl", 
glbCompiledStylesheet);
   
  -                     if (glbCompiledStylesheet == 0)
  +                     if (glbError != 0)
                        {
                                cerr << "ThreadSafe Error: \n" << 
theXalanTransformer.getLastError()
                                         << endl
  @@ -194,11 +194,13 @@
                        }
                        else
                        {
  +                             assert(glbCompiledStylesheet != 0);
  +
                                // Compile the XML source document as well. All 
threads will use
                                // this binary representation of the source tree.
  -                             glbParsedSource = 
theXalanTransformer.parseSource("birds.xml");
  +                             glbError = 
theXalanTransformer.parseSource("birds.xml", glbParsedSource);
   
  -                             if (glbParsedSource == 0)
  +                             if (glbError != 0)
                                {
                                        cerr << "ThreadSafe Error: \n" << 
theXalanTransformer.getLastError()
                                                 << endl
  @@ -206,6 +208,8 @@
                                }
                                else
                                {
  +                                     assert(glbParsedSource != 0);
  +
                                        // Create and run the threads...
                                        // Each thread uses the same document and 
                                        // stylesheet to perform a transformation.
  
  
  

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

Reply via email to