Posting request for help again as first attempt went without any response...
I'm trying to cache the schemas used by my documents in order to improve
parsing performance. The problem I'm running into is that when I enable caching
via XercesDOMParser::cacheGrammarFromParse(true), only my first document loads
without errors and all subsequent documents fail. What's strange is that if
this option is disabled then all my documents load without errors. I've also
tried pre-loading all my schemas using XercesDOMParser::loadGrammar() but came
up with with the same results.
Note that I'm using Xerces 2.5.0-1 under Cygwin. Here's what my code looks
like...
parser->setValidationScheme(XERCES_CPP_NAMESPACE::XercesDOMParser::Val_Always);
parser->setDoNamespaces(true);
parser->setDoSchema(true);
parser->cacheGrammarFromParse(true);
parser->setIncludeIgnorableWhitespace(false);
parser->setCreateEntityReferenceNodes(false);
// iterate over my list of documents doing the following...
parser->parse(file);
doc = parser->adoptDocument();
// ...and store the adopted document away for later use
Any pointers would be much appreciated.
-Brian