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, ...@@ -39,21 +39,19 @@ XMLParser::XMLParser( intf_thread_t *pIntf, const string &rFileName,
m_pReader = NULL; m_pReader = NULL;
m_pStream = NULL; m_pStream = NULL;
if( useDTD )
{
m_pXML = xml_Create( pIntf ); m_pXML = xml_Create( pIntf );
if( !m_pXML ) if( m_pXML )
LoadCatalog();
else
{ {
msg_Err( getIntf(), "failed to open XML parser" ); msg_Err( getIntf(), "DTD not supported" );
return; useDTD = false;
} }
}
// Avoid duplicate initialization (mutex needed ?) -> doesn't work else
// Reinitialization required for a new XMLParser m_pXML = NULL;
// if( !m_initialized )
// {
// LoadCatalog();
// m_initialized = true;
// }
LoadCatalog();
char* psz_uri = make_URI( rFileName.c_str(), NULL ); char* psz_uri = make_URI( rFileName.c_str(), NULL );
m_pStream = stream_UrlNew( pIntf, psz_uri ); 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