Skip to content

Commit

Permalink
try to resolve internal and external subset with functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rmottola committed Dec 18, 2024
1 parent 4a4a802 commit a94dee4
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Source/Additions/GSXML.m
Original file line number Diff line number Diff line change
Expand Up @@ -2966,7 +2966,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;
}
Expand All @@ -2980,7 +2984,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;
}
Expand Down Expand Up @@ -3694,6 +3702,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;
Expand All @@ -3712,7 +3721,6 @@ - (BOOL) _initLibXML
LIB->fatalError = (void*) fatalErrorFunction;
LIB->getParameterEntity = (void*) getParameterEntityFunction;
LIB->cdataBlock = (void*) cdataBlockFunction;
LIB->resolveEntity = (void*) resolveEntityFunction;
#undef LIB
return YES;
}
Expand Down Expand Up @@ -3814,6 +3822,7 @@ - (BOOL) _initLibXML
SETCB(isStandalone, isStandalone);
SETCB(hasInternalSubset, hasInternalSubset);
SETCB(hasExternalSubset, hasExternalSubset);
LIB->resolveEntity = resolveEntityFunction;
SETCB(getEntity, getEntity:);
if (LIB->getEntity != getEntityFunction)
{
Expand Down Expand Up @@ -3871,6 +3880,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;
Expand Down

0 comments on commit a94dee4

Please sign in to comment.