From cf8751942b88aa4d36da8dae97922bd34bdf60dc Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Thu, 1 Feb 2024 19:26:42 +0100 Subject: [PATCH] valid: Deprecate old DTD serialization API --- include/libxml/valid.h | 9 +++++++-- valid.c | 12 ++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/include/libxml/valid.h b/include/libxml/valid.h index 0ea5cfa8..10d6d190 100644 --- a/include/libxml/valid.h +++ b/include/libxml/valid.h @@ -148,9 +148,11 @@ XMLPUBFUN xmlNotationTablePtr XMLPUBFUN void xmlFreeNotationTable (xmlNotationTablePtr table); #ifdef LIBXML_OUTPUT_ENABLED +XML_DEPRECATED XMLPUBFUN void xmlDumpNotationDecl (xmlBufferPtr buf, xmlNotationPtr nota); +/* XML_DEPRECATED, still used in lxml */ XMLPUBFUN void xmlDumpNotationTable (xmlBufferPtr buf, xmlNotationTablePtr table); @@ -182,13 +184,12 @@ XMLPUBFUN void xmlElementContentPtr content, int englob); #ifdef LIBXML_OUTPUT_ENABLED -/* DEPRECATED */ +XML_DEPRECATED XMLPUBFUN void xmlSprintfElementContent(char *buf, xmlElementContentPtr content, int englob); #endif /* LIBXML_OUTPUT_ENABLED */ -/* DEPRECATED */ /* Element */ XMLPUBFUN xmlElementPtr @@ -204,9 +205,11 @@ XMLPUBFUN xmlElementTablePtr XMLPUBFUN void xmlFreeElementTable (xmlElementTablePtr table); #ifdef LIBXML_OUTPUT_ENABLED +XML_DEPRECATED XMLPUBFUN void xmlDumpElementTable (xmlBufferPtr buf, xmlElementTablePtr table); +XML_DEPRECATED XMLPUBFUN void xmlDumpElementDecl (xmlBufferPtr buf, xmlElementPtr elem); @@ -240,9 +243,11 @@ XMLPUBFUN xmlAttributeTablePtr XMLPUBFUN void xmlFreeAttributeTable (xmlAttributeTablePtr table); #ifdef LIBXML_OUTPUT_ENABLED +XML_DEPRECATED XMLPUBFUN void xmlDumpAttributeTable (xmlBufferPtr buf, xmlAttributeTablePtr table); +XML_DEPRECATED XMLPUBFUN void xmlDumpAttributeDecl (xmlBufferPtr buf, xmlAttributePtr attr); diff --git a/valid.c b/valid.c index 24d292d7..19d64472 100644 --- a/valid.c +++ b/valid.c @@ -1409,6 +1409,8 @@ xmlCopyElementTable(xmlElementTablePtr table) { * @buf: the XML buffer output * @elem: An element table * + * DEPRECATED: Use xmlSaveTree. + * * This will dump the content of the element declaration as an XML * DTD definition */ @@ -1443,6 +1445,8 @@ xmlDumpElementDeclScan(void *elem, void *buf, * @buf: the XML buffer output * @table: An element table * + * DEPRECATED: Don't use. + * * This will dump the content of the element table as an XML DTD definition */ void @@ -1948,6 +1952,8 @@ xmlCopyAttributeTable(xmlAttributeTablePtr table) { * @buf: the XML buffer output * @attr: An attribute declaration * + * DEPRECATED: Use xmlSaveTree. + * * This will dump the content of the attribute declaration as an XML * DTD definition */ @@ -1981,6 +1987,8 @@ xmlDumpAttributeDeclScan(void *attr, void *buf, * @buf: the XML buffer output * @table: An attribute table * + * DEPRECATED: Don't use. + * * This will dump the content of the attribute table as an XML DTD definition */ void @@ -2181,6 +2189,8 @@ xmlCopyNotationTable(xmlNotationTablePtr table) { * @buf: the XML buffer output * @nota: A notation declaration * + * DEPRECATED: Don't use. + * * This will dump the content the notation declaration as an XML DTD definition */ void @@ -2200,6 +2210,8 @@ xmlDumpNotationDecl(xmlBufferPtr buf, xmlNotationPtr nota) { * @buf: the XML buffer output * @table: A notation table * + * DEPRECATED: Don't use. + * * This will dump the content of the notation table as an XML DTD definition */ void