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

38
valid.c
View File

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