diff --git a/SAX2.c b/SAX2.c index 3f5624d1..4f2c8dc3 100644 --- a/SAX2.c +++ b/SAX2.c @@ -1673,6 +1673,18 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED) */ nodePop(ctxt); } +#else /* LIBXML_SAX1_ENABLED || LIBXML_HTML_ENABLED || LIBXML_LEGACY_ENABLED */ +/** DOC_DISABLE */ +void +xmlSAX2StartElement(void *ctx ATTRIBUTE_UNUSED, + const xmlChar *fullname ATTRIBUTE_UNUSED, + const xmlChar **atts ATTRIBUTE_UNUSED) { +} +void +xmlSAX2EndElement(void *ctx ATTRIBUTE_UNUSED, + const xmlChar *name ATTRIBUTE_UNUSED) { +} +/** DOC_ENABLE */ #endif /* LIBXML_SAX1_ENABLED || LIBXML_HTML_ENABLED || LIBXML_LEGACY_ENABLED */ /* diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index 8ca5bff0..7df8b9dc 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -13050,7 +13050,6 @@ Could we use @subtypes for this?'/> - defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) called when the end of an element has been detected. @@ -13196,7 +13195,6 @@ Could we use @subtypes for this?'/> - defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) called when an opening tag has been processed. diff --git a/include/libxml/SAX2.h b/include/libxml/SAX2.h index 4c4ecce8..52e3ef42 100644 --- a/include/libxml/SAX2.h +++ b/include/libxml/SAX2.h @@ -95,8 +95,6 @@ XMLPUBFUN void xmlSAX2StartDocument (void *ctx); XMLPUBFUN void xmlSAX2EndDocument (void *ctx); -#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ - defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) XMLPUBFUN void xmlSAX2StartElement (void *ctx, const xmlChar *fullname, @@ -104,7 +102,6 @@ XMLPUBFUN void XMLPUBFUN void xmlSAX2EndElement (void *ctx, const xmlChar *name); -#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */ XMLPUBFUN void xmlSAX2StartElementNs (void *ctx, const xmlChar *localname, diff --git a/testapi.c b/testapi.c index afb4affa..401d0283 100644 --- a/testapi.c +++ b/testapi.c @@ -4191,7 +4191,6 @@ static int test_xmlSAX2EndElement(void) { int test_ret = 0; -#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) #ifdef LIBXML_SAX1_ENABLED int mem_base; void * ctx; /* the user data (XML parser context) */ @@ -4221,7 +4220,6 @@ test_xmlSAX2EndElement(void) { } } function_tests++; -#endif #endif return(test_ret); @@ -5121,7 +5119,6 @@ static int test_xmlSAX2StartElement(void) { int test_ret = 0; -#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) #ifdef LIBXML_SAX1_ENABLED int mem_base; void * ctx; /* the user data (XML parser context) */ @@ -5158,7 +5155,6 @@ test_xmlSAX2StartElement(void) { } } function_tests++; -#endif #endif return(test_ret);