Details
Description
The program below crashes on the parser3->loadGrammar call, while it works
properly for parser1 and parser2. I've tested this both on cygwin (gcc 3.2) and
SunOS 5.9 (gcc 2.95.3).
George
========================================================================
#include <xercesc/parsers/SAXParser.hpp>
#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/validators/DTD/DTDGrammar.hpp>
#include <xercesc/sax2/XMLReaderFactory.hpp>
#include <iostream>
XERCES_CPP_NAMESPACE_USE
int main(int argc, char* argv[]) {
XMLPlatformUtils::Initialize();
SAXParser* parser1 = new SAXParser();
parser1->loadGrammar(argv[1], Grammar::DTDGrammarType, true);
std::cerr << "SAXParser.loadGrammar ok" << std::endl;
SAX2XMLReader* parser2 = XMLReaderFactory::createXMLReader();
parser2->loadGrammar(argv[1], Grammar::DTDGrammarType, true);
std::cerr << "SAX2XMLReader.loadGrammar ok" << std::endl;
/* XercesDOMParser crashes */
XercesDOMParser* parser3 = new XercesDOMParser();
parser3->loadGrammar(argv[1], Grammar::DTDGrammarType, true);
std::cerr << "XercesDOMParser.loadGrammar ok" << std::endl;
}