dbertoni    01/06/07 10:41:59

  Modified:    c/samples/XalanTransform XalanTransform.cpp
  Log:
  Simplified sample.
  
  Revision  Changes    Path
  1.6       +2 -15     xml-xalan/c/samples/XalanTransform/XalanTransform.cpp
  
  Index: XalanTransform.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/samples/XalanTransform/XalanTransform.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XalanTransform.cpp        2001/06/07 17:30:23     1.5
  +++ XalanTransform.cpp        2001/06/07 17:41:56     1.6
  @@ -43,17 +43,12 @@
       // Create a XalanTransformer.
        XalanTransformer theXalanTransformer;
   
  -     const char*     theXMLFileName = argv[1];
  -     const char*     theXSLFileName = argv[2];
  -
       int                              theResult = 0;
   
       if (argc == 4)
        {
  -         const char*                 theOutFileName = argv[3];
  -
           // Do the transform.
  -        theResult = theXalanTransformer.transform(theXMLFileName, theXSLFileName, 
theOutFileName);
  +        theResult = theXalanTransformer.transform(argv[1], argv[2], argv[3]);
           
           if(theResult != 0)
            {
  @@ -62,20 +57,12 @@
       }
       else
       {
  -        ostrstream   theOutput;
  -
           // Do the transform.
  -        theResult = theXalanTransformer.transform(theXMLFileName, theXSLFileName, 
theOutput);
  +        theResult = theXalanTransformer.transform(argv[1], argv[2], cout);
           
           if(theResult != 0)
            {
                    cerr << "XalanError: \n" << theXalanTransformer.getLastError();
  -         }
  -         else
  -         {
  -                 theOutput << '\0';
  -
  -                 cout << theOutput.str();
            }
       }
   
  
  
  

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

Reply via email to