Hi,
The proposed patch would not resolve a compiler error.

What header files are you including?  Do you have #include
<xercesc/validators/DTD/DTDGrammar.hpp>?

Regards,
David A. Cargill



                                                                                       
                                                
                      "Andreas B. Thun"                                                
                                                
                      <[EMAIL PROTECTED]>            To:       [EMAIL PROTECTED]       
                                            
                                               cc:                                     
                                                
                      07/30/2003 03:08         Subject:  Validation with another DTD 
than specified in XML file                        
                      AM                                                               
                                                
                      Please respond to                                                
                                                
                      xerces-c-dev                                                     
                                                
                                                                                       
                                                
                                                                                       
                                                




> 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]





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

Reply via email to