You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ca...@apache.org on 2004/11/24 22:04:16 UTC

cvs commit: xml-xerces/c/src/xercesc/internal DGXMLScanner.cpp IGXMLScanner.cpp

cargilld    2004/11/24 13:04:16

  Modified:    c/src/xercesc/internal DGXMLScanner.cpp IGXMLScanner.cpp
  Log:
  Fix from Dave Bertoni to correctly report the boundaries of an external subset.
  
  Revision  Changes    Path
  1.55      +10 -1     xml-xerces/c/src/xercesc/internal/DGXMLScanner.cpp
  
  Index: DGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/DGXMLScanner.cpp,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- DGXMLScanner.cpp	28 Sep 2004 21:27:38 -0000	1.54
  +++ DGXMLScanner.cpp	24 Nov 2004 21:04:16 -0000	1.55
  @@ -981,6 +981,15 @@
                   fDTDGrammar = (DTDGrammar*) grammar;
                   fGrammar = fDTDGrammar;
                   fValidator->setGrammar(fGrammar);
  +                // If we don't report at least the external subset boundaries,
  +                // an advanced document handler cannot know when the DTD end,
  +                // since we've already sent a doctype decl that indicates there's
  +                // there's an external subset.
  +                if (fDocTypeHandler)
  +                {
  +                    fDocTypeHandler->startExtSubset();
  +                    fDocTypeHandler->endExtSubset();
  +                }
                   // we *cannot* identify the root element on 
                   // cached grammars; else we risk breaking multithreaded
                   // applications.  - NG
  
  
  
  1.78      +10 -1     xml-xerces/c/src/xercesc/internal/IGXMLScanner.cpp
  
  Index: IGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/IGXMLScanner.cpp,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- IGXMLScanner.cpp	19 Oct 2004 15:08:53 -0000	1.77
  +++ IGXMLScanner.cpp	24 Nov 2004 21:04:16 -0000	1.78
  @@ -1432,6 +1432,15 @@
                   fDTDGrammar = (DTDGrammar*) grammar;
                   fGrammar = fDTDGrammar;
                   fValidator->setGrammar(fGrammar);
  +                // If we don't report at least the external subset boundaries,
  +                // an advanced document handler cannot know when the DTD end,
  +                // since we've already sent a doctype decl that indicates there's
  +                // there's an external subset.
  +                if (fDocTypeHandler)
  +                {
  +                    fDocTypeHandler->startExtSubset();
  +                    fDocTypeHandler->endExtSubset();
  +                }
                   // should not be modifying cached grammars!
                   /********
                   rootDecl = (DTDElementDecl*) fGrammar->getElemDecl(fEmptyNamespaceId, 0, bbRootName.getRawBuffer(), Grammar::TOP_LEVEL_SCOPE);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org