diff --git a/Source/Additions/GSXML.m b/Source/Additions/GSXML.m index 80285bfff..e5acf87fe 100644 --- a/Source/Additions/GSXML.m +++ b/Source/Additions/GSXML.m @@ -2992,7 +2992,11 @@ + (void) initialize has = [HANDLER hasInternalSubset]; if (has < 0) { - has = TREEFUN(hasInternalSubset, (ctx)); +#if LIBXML_VERSION >= 20900 + has = xmlSAX2HasInternalSubset (ctx); +#else + has = xmlInternalSubset (ctxt); +#endif } return has; } @@ -3006,7 +3010,11 @@ + (void) initialize has = [HANDLER hasExternalSubset]; if (has < 0) { - has = TREEFUN(hasExternalSubset, (ctx)); +#if LIBXML_VERSION >= 20900 + has = xmlSAX2HasExternalSubset (ctx); +#else + has = xmlExternalSubset (ctx); +#endif } return has; } @@ -3720,6 +3728,7 @@ - (BOOL) _initLibXML LIB->isStandalone = (void*) isStandaloneFunction; LIB->hasInternalSubset = (void*) hasInternalSubsetFunction; LIB->hasExternalSubset = (void*) hasExternalSubsetFunction; + LIB->resolveEntity = (void*) resolveEntityFunction; LIB->getEntity = (void*) getEntityIgnoreExternal; LIB->entityDecl = (void*) entityDeclFunction; LIB->notationDecl = (void*) notationDeclFunction; @@ -3738,7 +3747,6 @@ - (BOOL) _initLibXML LIB->fatalError = (void*) fatalErrorFunction; LIB->getParameterEntity = (void*) getParameterEntityFunction; LIB->cdataBlock = (void*) cdataBlockFunction; - LIB->resolveEntity = (void*) resolveEntityFunction; #undef LIB return YES; } @@ -3840,6 +3848,7 @@ - (BOOL) _initLibXML SETCB(isStandalone, isStandalone); SETCB(hasInternalSubset, hasInternalSubset); SETCB(hasExternalSubset, hasExternalSubset); + LIB->resolveEntity = resolveEntityFunction; SETCB(getEntity, getEntity:); if (LIB->getEntity != getEntityFunction) { @@ -3897,6 +3906,7 @@ - (BOOL) _initLibXML LIB->isStandalone = (void*)isStandaloneFunction; LIB->hasInternalSubset = (void*)hasInternalSubsetFunction; LIB->hasExternalSubset = (void*)hasExternalSubsetFunction; + LIB->resolveEntity = (void*)resolveEntityFunction; LIB->getEntity = (void*)getEntityFunction; LIB->entityDecl = (void*)entityDeclFunction; LIB->notationDecl = (void*)notationDeclFunction;