Commit 49b4824b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

skins2: don't load XML catalog if DTD not requested

Also don't fail if the XML validator cannot be loaded.
parent 6141b54e
......@@ -39,21 +39,19 @@ XMLParser::XMLParser( intf_thread_t *pIntf, const string &rFileName,
m_pReader = NULL;
m_pStream = NULL;
m_pXML = xml_Create( pIntf );
if( !m_pXML )
if( useDTD )
{
msg_Err( getIntf(), "failed to open XML parser" );
return;
m_pXML = xml_Create( pIntf );
if( m_pXML )
LoadCatalog();
else
{
msg_Err( getIntf(), "DTD not supported" );
useDTD = false;
}
}
// Avoid duplicate initialization (mutex needed ?) -> doesn't work
// Reinitialization required for a new XMLParser
// if( !m_initialized )
// {
// LoadCatalog();
// m_initialized = true;
// }
LoadCatalog();
else
m_pXML = NULL;
char* psz_uri = make_URI( rFileName.c_str(), NULL );
m_pStream = stream_UrlNew( pIntf, psz_uri );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment