You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ro...@locus.apache.org on 2000/01/19 01:55:46 UTC

cvs commit: xml-xerces/c/src/internal ElemStack.cpp XMLScanner.cpp

roddey      00/01/18 16:55:45

  Modified:    c/src/internal ElemStack.cpp XMLScanner.cpp
  Log:
  Changes to get rid of dependence on old utils standard streams classes
  and a small fix in the progressive parseFirst() call.
  
  Revision  Changes    Path
  1.2       +3 -55     xml-xerces/c/src/internal/ElemStack.cpp
  
  Index: ElemStack.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/internal/ElemStack.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ElemStack.cpp	1999/11/09 01:08:04	1.1
  +++ ElemStack.cpp	2000/01/19 00:55:45	1.2
  @@ -56,9 +56,13 @@
   
   /**
    * $Log: ElemStack.cpp,v $
  - * Revision 1.1  1999/11/09 01:08:04  twl
  - * Initial revision
  + * Revision 1.2  2000/01/19 00:55:45  roddey
  + * Changes to get rid of dependence on old utils standard streams classes
  + * and a small fix in the progressive parseFirst() call.
    *
  + * Revision 1.1.1.1  1999/11/09 01:08:04  twl
  + * Initial checkin
  + *
    * Revision 1.4  1999/11/08 20:44:41  rahul
    * Swat for adding in Product name and CVS comment log variable.
    *
  @@ -74,11 +78,6 @@
   #include <framework/XMLElementDecl.hpp>
   #include <internal/ElemStack.hpp>
   
  -#if defined(XML4C_DEBUG)
  -#include <util/TextOutputStream.hpp>
  -#include <framework/XMLValidator.hpp>
  -#endif
  -
   
   // ---------------------------------------------------------------------------
   //  ElemStack: Constructors and Destructor
  @@ -430,56 +429,6 @@
       fXMLNamespaceId = xmlId;
       fXMLNSNamespaceId = xmlNSId;
   }
  -
  -
  -
  -// ---------------------------------------------------------------------------
  -//  ElemStack: Debug only stuff
  -// ---------------------------------------------------------------------------
  -#if defined(XML4C_DEBUG)
  -
  -void ElemStack::dumpStacks(TextOutputStream& target, const XMLValidator& srcPools)
  -{
  -    // Display a simple header
  -    target  << "\nElement stack dump:\n"
  -            << "-------------------------------------------\n\n";
  -
  -    //
  -    //  Display the stack by nested elements, and the associated namespace
  -    //  map for each level. Note that we are only ever tracing a single
  -    //  path down through the content, so we don't even bother actually
  -    //  indenting them (because the nesting is implicit.)
  -    //
  -    if (!fStack)
  -    {
  -        target << "<<Stack is empty>>\n";
  -        return;
  -    }
  -
  -    for (int index = fStackTop - 1; index > 0; index--)
  -    {
  -        // Get the next stack element up the chain
  -        const StackElem* curElem = fStack[index];
  -
  -        target  << "ELEMENT: " << curElem->fThisElement->getFullName() << "\n";
  -
  -        target  << "    CHILDREN: \n";
  -        for (unsigned int childInd = 0; childInd < curElem->fChildCount; childInd++)
  -        {
  -            // Get the elem decl for this child
  -            const XMLElementDecl* child
  -                            = srcPools.getElemDecl(curElem->fChildIds[childInd]);
  -            target  << "       " << child->getFullName() << "\n";
  -        }
  -
  -        target  << "END ELEMENT\n";
  -    }
  -
  -    target << EndLn;
  -}
  -
  -#endif
  -
   
   
   // ---------------------------------------------------------------------------
  
  
  
  1.8       +15 -5     xml-xerces/c/src/internal/XMLScanner.cpp
  
  Index: XMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/internal/XMLScanner.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMLScanner.cpp	2000/01/15 01:26:16	1.7
  +++ XMLScanner.cpp	2000/01/19 00:55:45	1.8
  @@ -56,6 +56,10 @@
   
   /**
    * $Log: XMLScanner.cpp,v $
  + * Revision 1.8  2000/01/19 00:55:45  roddey
  + * Changes to get rid of dependence on old utils standard streams classes
  + * and a small fix in the progressive parseFirst() call.
  + *
    * Revision 1.7  2000/01/15 01:26:16  rahulj
    * Added support for HTTP to the parser using libWWW 5.2.8.
    * Renamed URL.[ch]pp to XMLURL.[ch]pp and like wise for the class name.
  @@ -128,10 +132,6 @@
   #include <internal/XMLScanner.hpp>
   #include <internal/EndOfEntityException.hpp>
   
  -#if defined(XML4C_DEBUG)
  -#include <util/StdOut.hpp>
  -#endif
  -
   
   
   // ---------------------------------------------------------------------------
  @@ -436,7 +436,15 @@
       InputSource* srcToUse = 0;
       try
       {
  -        srcToUse = new URLInputSource(XMLUni::fgZeroLenString, systemId);
  +        //
  +        //  Create a temporary URL. Since this is the primary document,
  +        //  it has to be fully qualified. If not, then assume we are just
  +        //  mistaking a file for a URL.
  +        //
  +        XMLURL tmpURL(systemId);
  +        if (tmpURL.isRelative())
  +            ThrowXML(MalformedURLException, XML4CExcepts::URL_NoProtocolPresent);
  +        srcToUse = new URLInputSource(tmpURL);
       }
   
       catch(const MalformedURLException&)