Updated component defaults files to match component schema and made schema validation strict.
This commit is contained in:
@@ -23,6 +23,8 @@ void EntityFile::Parse(const EntityFileHandler* handler) const
|
||||
EntityFileSAXHandler saxHandler(handler, nullptr);
|
||||
m_SAX2XMLReader->setFeature(XMLUni::fgXercesCacheGrammarFromParse, true);
|
||||
m_SAX2XMLReader->setFeature(XMLUni::fgXercesUseCachedGrammarInParse, true);
|
||||
m_SAX2XMLReader->setFeature(XMLUni::fgXercesSchema, true);
|
||||
m_SAX2XMLReader->setFeature(XMLUni::fgXercesSchemaFullChecking, true);
|
||||
m_SAX2XMLReader->setContentHandler(&saxHandler);
|
||||
m_SAX2XMLReader->setErrorHandler(&saxHandler);
|
||||
m_SAX2XMLReader->setDeclarationHandler(&saxHandler);
|
||||
|
||||
@@ -174,7 +174,11 @@ void EntityFilePreprocessor::parseDefaults()
|
||||
memset(ci.second.Defaults.get(), 0, ci.second.Meta.Stride);
|
||||
|
||||
XercesDOMParser parser(nullptr, XMLPlatformUtils::fgMemoryManager);
|
||||
parser.setDoSchema(true);
|
||||
parser.setDoNamespaces(true);
|
||||
parser.setErrorHandler(&errorHandler);
|
||||
parser.setValidationScheme(XercesDOMParser::Val_Always);
|
||||
parser.setValidationSchemaFullChecking(true);
|
||||
|
||||
std::string componentName = ci.first;
|
||||
LOG_DEBUG("Parsing defaults for component %s", componentName.c_str());
|
||||
|
||||
Reference in New Issue
Block a user