If you have:
XercesDOMParser*  parser3 = new XercesDOMParser();
parser3->loadGrammar(filename, Grammar::DTDGrammarType, true);
then you will get a seg fault, unless you use the patch for 21001.

I have ...:


        // create parser and do some settings
        XercesDOMParser* parser = new XercesDOMParser();
        parser->setDoSchema( true );
        parser->setValidationScheme(valScheme);
        parser->setDoNamespaces(false);
        parser->setIncludeIgnorableWhitespace(false);

        // Load DTD grammar and cache it
        parser->loadGrammar("x.dtd", Grammar::DTDGrammarType, true);

        // enable grammar reuse
        parser->setFeature(XMLUni::fgXercesUseCachedGrammarInParse, true);

        // create an error handler and install it
        DOMTreeErrorReporter *errReporter = new DOMTreeErrorReporter();
        parser->setErrorHandler(errReporter);

        try {
                parser->parse(xmlFile);
        }


... and get a compiler error:


DOMParse.cpp: In function `int readXMLFile(const char*, std::basic_string<char,
   std::char_traits<char>, std::allocator<char> >,
   ConstraintTemplate::ConstraintTypesFactory&, std::basic_string<char,
   std::char_traits<char>, std::allocator<char> >)':
DOMParse.cpp:1902: error: incomplete type `xercesc_2_3::Grammar' does not have
   member `DTDGrammarType'
DOMParse.cpp:1905: error: `setFeature' undeclared (first use this function)



Where can I get the patch? I wasn�t able to get a connection with
the tarball site...





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to