You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@locus.apache.org on 2000/11/02 00:47:35 UTC

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

andyh       00/11/01 15:47:34

  Modified:    c/src/internal XMLScanner.cpp
  Log:
  Scanner bug fix:  with progessive parsing, namesapce and validation
  options were not being set correctly.  Symptoms included failure to detect
  ignorable white space.  Fixed by Tinny Ng.
  
  Revision  Changes    Path
  1.23      +23 -1     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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- XMLScanner.cpp	2000/07/25 22:33:05	1.22
  +++ XMLScanner.cpp	2000/11/01 23:47:33	1.23
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: XMLScanner.cpp,v 1.22 2000/07/25 22:33:05 aruna1 Exp $
  + * $Id: XMLScanner.cpp,v 1.23 2000/11/01 23:47:33 andyh Exp $
    */
   
   
  @@ -502,6 +502,28 @@
           //  first.
           //
           scanProlog();
  +
  +        //
  +        //  At this point, we know which type of validation we are going to
  +        //  use (if the plugged in validator handles either DTD or Schemas)
  +        //  since we will have seen the DOCTYPE or PI that set it up.  So lets
  +        //  ask the validator whether it requires namespaces or not.  If it
  +        //  does, we have to override the namespace enablement flag.
  +        //
  +        if (fValidator->requiresNamespaces() && !fDoNamespaces)
  +            fDoNamespaces = true;
  +
  +        //
  +        //  Set our validation flag at this point. If the validation
  +        //  scheme is not auto, then take that. Else see if we saw any
  +        //  subset.
  +        //
  +        if (fValScheme == Val_Never)
  +            fValidate = false;
  +        else if (fValScheme == Val_Always)
  +            fValidate = true;
  +        else
  +            fValidate = fHaveSubset;
       }
   
       //