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/04/11 01:02:00 UTC

cvs commit: xml-xerces/c/src/validators/DTD DTDValidator2.cpp

roddey      00/04/10 16:02:00

  Modified:    c/src/validators/DTD DTDValidator2.cpp
  Log:
  Allow an empty DOCTYPE declaration, with just the root name.
  
  Revision  Changes    Path
  1.14      +16 -1     xml-xerces/c/src/validators/DTD/DTDValidator2.cpp
  
  Index: DTDValidator2.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/validators/DTD/DTDValidator2.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DTDValidator2.cpp	2000/03/08 23:41:18	1.13
  +++ DTDValidator2.cpp	2000/04/10 23:02:00	1.14
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: DTDValidator2.cpp,v $
  + * Revision 1.14  2000/04/10 23:02:00  roddey
  + * Allow an empty DOCTYPE declaration, with just the root name.
  + *
    * Revision 1.13  2000/03/08 23:41:18  roddey
    * Some fixes for content models that have multiple, trailing, empty
    * PE refs (for content model extension.)
  @@ -1550,6 +1553,14 @@
       // Skip any spaces after the name
       getReaderMgr()->skipPastSpaces();
   
  +    //
  +    //  And now if we are looking at a >, then we are done. It is not
  +    //  required to have an internal or external subset, though why you
  +    //  would not escapes me.
  +    //
  +    if (getReaderMgr()->skippedChar(chCloseAngle))
  +        return;
  +
       bool    hasIntSubset = false;
       bool    hasExtSubset = false;
       XMLCh*  sysId = 0;
  @@ -1615,7 +1626,10 @@
           // Indicate we are in the internal subset now
           FlagJanitor<bool> janContentFlag(&fInternalSubset, true);
   
  -        // Set the current subset flag to let the scanning code know which
  +        //
  +        //  And try to scan the internal subset. If we fail, try to recover
  +        //  by skipping forward tot he close angle and returning.
  +        //
           if (!scanInternalSubset())
           {
               getReaderMgr()->skipPastChar(chCloseAngle);