valid: Deprecate more internal functions

This commit is contained in:
Nick Wellnhofer 2024-11-17 19:45:16 +01:00
parent de0c779116
commit 4d1f35b0a9
2 changed files with 57 additions and 0 deletions

View File

@ -139,14 +139,17 @@ typedef struct _xmlHashTable xmlRefTable;
typedef xmlRefTable *xmlRefTablePtr; typedef xmlRefTable *xmlRefTablePtr;
/* Notation */ /* Notation */
XML_DEPRECATED
XMLPUBFUN xmlNotationPtr XMLPUBFUN xmlNotationPtr
xmlAddNotationDecl (xmlValidCtxtPtr ctxt, xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd, xmlDtdPtr dtd,
const xmlChar *name, const xmlChar *name,
const xmlChar *PublicID, const xmlChar *PublicID,
const xmlChar *SystemID); const xmlChar *SystemID);
XML_DEPRECATED
XMLPUBFUN xmlNotationTablePtr XMLPUBFUN xmlNotationTablePtr
xmlCopyNotationTable (xmlNotationTablePtr table); xmlCopyNotationTable (xmlNotationTablePtr table);
XML_DEPRECATED
XMLPUBFUN void XMLPUBFUN void
xmlFreeNotationTable (xmlNotationTablePtr table); xmlFreeNotationTable (xmlNotationTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
@ -162,24 +165,31 @@ XMLPUBFUN void
/* Element Content */ /* Element Content */
/* the non Doc version are being deprecated */ /* the non Doc version are being deprecated */
XML_DEPRECATED
XMLPUBFUN xmlElementContentPtr XMLPUBFUN xmlElementContentPtr
xmlNewElementContent (const xmlChar *name, xmlNewElementContent (const xmlChar *name,
xmlElementContentType type); xmlElementContentType type);
XML_DEPRECATED
XMLPUBFUN xmlElementContentPtr XMLPUBFUN xmlElementContentPtr
xmlCopyElementContent (xmlElementContentPtr content); xmlCopyElementContent (xmlElementContentPtr content);
XML_DEPRECATED
XMLPUBFUN void XMLPUBFUN void
xmlFreeElementContent (xmlElementContentPtr cur); xmlFreeElementContent (xmlElementContentPtr cur);
/* the new versions with doc argument */ /* the new versions with doc argument */
XML_DEPRECATED
XMLPUBFUN xmlElementContentPtr XMLPUBFUN xmlElementContentPtr
xmlNewDocElementContent (xmlDocPtr doc, xmlNewDocElementContent (xmlDocPtr doc,
const xmlChar *name, const xmlChar *name,
xmlElementContentType type); xmlElementContentType type);
XML_DEPRECATED
XMLPUBFUN xmlElementContentPtr XMLPUBFUN xmlElementContentPtr
xmlCopyDocElementContent(xmlDocPtr doc, xmlCopyDocElementContent(xmlDocPtr doc,
xmlElementContentPtr content); xmlElementContentPtr content);
XML_DEPRECATED
XMLPUBFUN void XMLPUBFUN void
xmlFreeDocElementContent(xmlDocPtr doc, xmlFreeDocElementContent(xmlDocPtr doc,
xmlElementContentPtr cur); xmlElementContentPtr cur);
XML_DEPRECATED
XMLPUBFUN void XMLPUBFUN void
xmlSnprintfElementContent(char *buf, xmlSnprintfElementContent(char *buf,
int size, int size,
@ -194,14 +204,17 @@ XMLPUBFUN void
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
/* Element */ /* Element */
XML_DEPRECATED
XMLPUBFUN xmlElementPtr XMLPUBFUN xmlElementPtr
xmlAddElementDecl (xmlValidCtxtPtr ctxt, xmlAddElementDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd, xmlDtdPtr dtd,
const xmlChar *name, const xmlChar *name,
xmlElementTypeVal type, xmlElementTypeVal type,
xmlElementContentPtr content); xmlElementContentPtr content);
XML_DEPRECATED
XMLPUBFUN xmlElementTablePtr XMLPUBFUN xmlElementTablePtr
xmlCopyElementTable (xmlElementTablePtr table); xmlCopyElementTable (xmlElementTablePtr table);
XML_DEPRECATED
XMLPUBFUN void XMLPUBFUN void
xmlFreeElementTable (xmlElementTablePtr table); xmlFreeElementTable (xmlElementTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
@ -216,14 +229,18 @@ XMLPUBFUN void
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
/* Enumeration */ /* Enumeration */
XML_DEPRECATED
XMLPUBFUN xmlEnumerationPtr XMLPUBFUN xmlEnumerationPtr
xmlCreateEnumeration (const xmlChar *name); xmlCreateEnumeration (const xmlChar *name);
/* XML_DEPRECATED, needed for custom attributeDecl SAX handler */
XMLPUBFUN void XMLPUBFUN void
xmlFreeEnumeration (xmlEnumerationPtr cur); xmlFreeEnumeration (xmlEnumerationPtr cur);
XML_DEPRECATED
XMLPUBFUN xmlEnumerationPtr XMLPUBFUN xmlEnumerationPtr
xmlCopyEnumeration (xmlEnumerationPtr cur); xmlCopyEnumeration (xmlEnumerationPtr cur);
/* Attribute */ /* Attribute */
XML_DEPRECATED
XMLPUBFUN xmlAttributePtr XMLPUBFUN xmlAttributePtr
xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd, xmlDtdPtr dtd,
@ -234,8 +251,10 @@ XMLPUBFUN xmlAttributePtr
xmlAttributeDefault def, xmlAttributeDefault def,
const xmlChar *defaultValue, const xmlChar *defaultValue,
xmlEnumerationPtr tree); xmlEnumerationPtr tree);
XML_DEPRECATED
XMLPUBFUN xmlAttributeTablePtr XMLPUBFUN xmlAttributeTablePtr
xmlCopyAttributeTable (xmlAttributeTablePtr table); xmlCopyAttributeTable (xmlAttributeTablePtr table);
XML_DEPRECATED
XMLPUBFUN void XMLPUBFUN void
xmlFreeAttributeTable (xmlAttributeTablePtr table); xmlFreeAttributeTable (xmlAttributeTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED

38
valid.c
View File

@ -707,6 +707,8 @@ xmlFreeValidCtxt(xmlValidCtxtPtr cur) {
* @name: the subelement name or NULL * @name: the subelement name or NULL
* @type: the type of element content decl * @type: the type of element content decl
* *
* DEPRECATED: Internal function, don't use.
*
* Allocate an element content structure for the document. * Allocate an element content structure for the document.
* *
* Returns NULL if not, otherwise the new element content structure * Returns NULL if not, otherwise the new element content structure
@ -785,6 +787,8 @@ error:
* @name: the subelement name or NULL * @name: the subelement name or NULL
* @type: the type of element content decl * @type: the type of element content decl
* *
* DEPRECATED: Internal function, don't use.
*
* Allocate an element content structure. * Allocate an element content structure.
* Deprecated in favor of xmlNewDocElementContent * Deprecated in favor of xmlNewDocElementContent
* *
@ -800,6 +804,8 @@ xmlNewElementContent(const xmlChar *name, xmlElementContentType type) {
* @doc: the document owning the element declaration * @doc: the document owning the element declaration
* @cur: An element content pointer. * @cur: An element content pointer.
* *
* DEPRECATED: Internal function, don't use.
*
* Build a copy of an element content description. * Build a copy of an element content description.
* *
* Returns the new xmlElementContentPtr or NULL in case of error. * Returns the new xmlElementContentPtr or NULL in case of error.
@ -893,6 +899,8 @@ error:
* xmlCopyElementContent: * xmlCopyElementContent:
* @cur: An element content pointer. * @cur: An element content pointer.
* *
* DEPRECATED: Internal function, don't use.
*
* Build a copy of an element content description. * Build a copy of an element content description.
* Deprecated, use xmlCopyDocElementContent instead * Deprecated, use xmlCopyDocElementContent instead
* *
@ -908,6 +916,8 @@ xmlCopyElementContent(xmlElementContentPtr cur) {
* @doc: the document owning the element declaration * @doc: the document owning the element declaration
* @cur: the element content tree to free * @cur: the element content tree to free
* *
* DEPRECATED: Internal function, don't use.
*
* Free an element content structure. The whole subtree is removed. * Free an element content structure. The whole subtree is removed.
*/ */
void void
@ -973,6 +983,8 @@ xmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
* xmlFreeElementContent: * xmlFreeElementContent:
* @cur: the element content tree to free * @cur: the element content tree to free
* *
* DEPRECATED: Internal function, don't use.
*
* Free an element content structure. The whole subtree is removed. * Free an element content structure. The whole subtree is removed.
* Deprecated, use xmlFreeDocElementContent instead * Deprecated, use xmlFreeDocElementContent instead
*/ */
@ -988,6 +1000,8 @@ xmlFreeElementContent(xmlElementContentPtr cur) {
* @content: An element table * @content: An element table
* @englob: 1 if one must print the englobing parenthesis, 0 otherwise * @englob: 1 if one must print the englobing parenthesis, 0 otherwise
* *
* DEPRECATED: Internal function, don't use.
*
* Deprecated, unsafe, use xmlSnprintfElementContent * Deprecated, unsafe, use xmlSnprintfElementContent
*/ */
void void
@ -1004,6 +1018,8 @@ xmlSprintfElementContent(char *buf ATTRIBUTE_UNUSED,
* @content: An element table * @content: An element table
* @englob: 1 if one must print the englobing parenthesis, 0 otherwise * @englob: 1 if one must print the englobing parenthesis, 0 otherwise
* *
* DEPRECATED: Internal function, don't use.
*
* This will dump the content of the element content definition * This will dump the content of the element content definition
* Intended just for the debug routine * Intended just for the debug routine
*/ */
@ -1136,6 +1152,8 @@ xmlFreeElement(xmlElementPtr elem) {
* @type: the element type * @type: the element type
* @content: the element content tree or NULL * @content: the element content tree or NULL
* *
* DEPRECATED: Internal function, don't use.
*
* Register a new element declaration * Register a new element declaration
* *
* Returns NULL if not, otherwise the entity * Returns NULL if not, otherwise the entity
@ -1345,6 +1363,8 @@ xmlFreeElementTableEntry(void *elem, const xmlChar *name ATTRIBUTE_UNUSED) {
* xmlFreeElementTable: * xmlFreeElementTable:
* @table: An element table * @table: An element table
* *
* DEPRECATED: Internal function, don't use.
*
* Deallocate the memory used by an element hash table. * Deallocate the memory used by an element hash table.
*/ */
void void
@ -1399,6 +1419,8 @@ error:
* xmlCopyElementTable: * xmlCopyElementTable:
* @table: An element table * @table: An element table
* *
* DEPRECATED: Internal function, don't use.
*
* Build a copy of an element table. * Build a copy of an element table.
* *
* Returns the new xmlElementTablePtr or NULL in case of error. * Returns the new xmlElementTablePtr or NULL in case of error.
@ -1473,6 +1495,8 @@ xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table) {
* xmlCreateEnumeration: * xmlCreateEnumeration:
* @name: the enumeration name or NULL * @name: the enumeration name or NULL
* *
* DEPRECATED: Internal function, don't use.
*
* create and initialize an enumeration attribute node. * create and initialize an enumeration attribute node.
* *
* Returns the xmlEnumerationPtr just created or NULL in case * Returns the xmlEnumerationPtr just created or NULL in case
@ -1520,6 +1544,8 @@ xmlFreeEnumeration(xmlEnumerationPtr cur) {
* xmlCopyEnumeration: * xmlCopyEnumeration:
* @cur: the tree to copy. * @cur: the tree to copy.
* *
* DEPRECATED: Internal function, don't use.
*
* Copy an enumeration attribute node (recursive). * Copy an enumeration attribute node (recursive).
* *
* Returns the xmlEnumerationPtr just created or NULL in case * Returns the xmlEnumerationPtr just created or NULL in case
@ -1638,6 +1664,8 @@ xmlFreeAttribute(xmlAttributePtr attr) {
* @defaultValue: the attribute default value * @defaultValue: the attribute default value
* @tree: if it's an enumeration, the associated list * @tree: if it's an enumeration, the associated list
* *
* DEPRECATED: Internal function, don't use.
*
* Register a new attribute declaration * Register a new attribute declaration
* Note that @tree becomes the ownership of the DTD * Note that @tree becomes the ownership of the DTD
* *
@ -1880,6 +1908,8 @@ xmlFreeAttributeTableEntry(void *attr, const xmlChar *name ATTRIBUTE_UNUSED) {
* xmlFreeAttributeTable: * xmlFreeAttributeTable:
* @table: An attribute table * @table: An attribute table
* *
* DEPRECATED: Internal function, don't use.
*
* Deallocate the memory used by an entities hash table. * Deallocate the memory used by an entities hash table.
*/ */
void void
@ -1943,6 +1973,8 @@ error:
* xmlCopyAttributeTable: * xmlCopyAttributeTable:
* @table: An attribute table * @table: An attribute table
* *
* DEPRECATED: Internal function, don't use.
*
* Build a copy of an attribute table. * Build a copy of an attribute table.
* *
* Returns the new xmlAttributeTablePtr or NULL in case of error. * Returns the new xmlAttributeTablePtr or NULL in case of error.
@ -2045,6 +2077,8 @@ xmlFreeNotation(xmlNotationPtr nota) {
* @PublicID: the public identifier or NULL * @PublicID: the public identifier or NULL
* @SystemID: the system identifier or NULL * @SystemID: the system identifier or NULL
* *
* DEPRECATED: Internal function, don't use.
*
* Register a new notation declaration * Register a new notation declaration
* *
* Returns NULL if not, otherwise the entity * Returns NULL if not, otherwise the entity
@ -2136,6 +2170,8 @@ xmlFreeNotationTableEntry(void *nota, const xmlChar *name ATTRIBUTE_UNUSED) {
* xmlFreeNotationTable: * xmlFreeNotationTable:
* @table: An notation table * @table: An notation table
* *
* DEPRECATED: Internal function, don't use.
*
* Deallocate the memory used by an entities hash table. * Deallocate the memory used by an entities hash table.
*/ */
void void
@ -2186,6 +2222,8 @@ error:
* xmlCopyNotationTable: * xmlCopyNotationTable:
* @table: A notation table * @table: A notation table
* *
* DEPRECATED: Internal function, don't use.
*
* Build a copy of a notation table. * Build a copy of a notation table.
* *
* Returns the new xmlNotationTablePtr or NULL in case of error. * Returns the new xmlNotationTablePtr or NULL in case of error.