diff --git a/include/libxml/tree.h b/include/libxml/tree.h index 851d312e..eabbd7ec 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -193,14 +193,17 @@ typedef struct _xmlNotation xmlNotation; typedef xmlNotation *xmlNotationPtr; /** * A DTD Notation definition. + * + * Should be treated as opaque. Accessing members directly + * is deprecated. */ struct _xmlNotation { /** Notation name */ - const xmlChar *name; + const xmlChar *name XML_DEPRECATED_MEMBER; /** Public identifier, if any */ - const xmlChar *PublicID; + const xmlChar *PublicID XML_DEPRECATED_MEMBER; /** System identifier, if any */ - const xmlChar *SystemID; + const xmlChar *SystemID XML_DEPRECATED_MEMBER; }; /** @@ -233,16 +236,24 @@ typedef struct _xmlEnumeration xmlEnumeration; typedef xmlEnumeration *xmlEnumerationPtr; /** * List structure used when there is an enumeration in DTDs. + * + * Should be treated as opaque. Accessing members directly + * is deprecated. */ struct _xmlEnumeration { - struct _xmlEnumeration *next; /* next one */ - const xmlChar *name; /* Enumeration name */ + /** next enumeration */ + struct _xmlEnumeration *next XML_DEPRECATED_MEMBER; + /** value */ + const xmlChar *name XML_DEPRECATED_MEMBER; }; typedef struct _xmlAttribute xmlAttribute; typedef xmlAttribute *xmlAttributePtr; /** * An Attribute declaration in a DTD. + * + * Should be treated as opaque. Accessing members directly + * is deprecated. */ struct _xmlAttribute { /** application data */ @@ -265,19 +276,19 @@ struct _xmlAttribute { struct _xmlDoc *doc; /** next in hash table */ - struct _xmlAttribute *nexth; + struct _xmlAttribute *nexth XML_DEPRECATED_MEMBER; /** attribute type */ - xmlAttributeType atype; + xmlAttributeType atype XML_DEPRECATED_MEMBER; /** attribute default */ - xmlAttributeDefault def; + xmlAttributeDefault def XML_DEPRECATED_MEMBER; /** default value */ - const xmlChar *defaultValue; + const xmlChar *defaultValue XML_DEPRECATED_MEMBER; /** enumeration tree if any */ - xmlEnumeration *tree; + xmlEnumeration *tree XML_DEPRECATED_MEMBER; /** namespace prefix if any */ - const xmlChar *prefix; + const xmlChar *prefix XML_DEPRECATED_MEMBER; /** element name */ - const xmlChar *elem; + const xmlChar *elem XML_DEPRECATED_MEMBER; }; /** @@ -305,22 +316,25 @@ typedef xmlElementContent *xmlElementContentPtr; /** * An XML Element content as stored after parsing an element definition * in a DTD. + * + * Should be treated as opaque. Accessing members directly + * is deprecated. */ struct _xmlElementContent { /** PCDATA, ELEMENT, SEQ or OR */ - xmlElementContentType type; + xmlElementContentType type XML_DEPRECATED_MEMBER; /** ONCE, OPT, MULT or PLUS */ - xmlElementContentOccur ocur; + xmlElementContentOccur ocur XML_DEPRECATED_MEMBER; /** element name */ - const xmlChar *name; + const xmlChar *name XML_DEPRECATED_MEMBER; /** first child */ - struct _xmlElementContent *c1; + struct _xmlElementContent *c1 XML_DEPRECATED_MEMBER; /** second child */ - struct _xmlElementContent *c2; + struct _xmlElementContent *c2 XML_DEPRECATED_MEMBER; /** parent */ - struct _xmlElementContent *parent; + struct _xmlElementContent *parent XML_DEPRECATED_MEMBER; /** namespace prefix */ - const xmlChar *prefix; + const xmlChar *prefix XML_DEPRECATED_MEMBER; }; /** @@ -338,6 +352,9 @@ typedef struct _xmlElement xmlElement; typedef xmlElement *xmlElementPtr; /** * An XML Element declaration from a DTD. + * + * Should be treated as opaque. Accessing members directly + * is deprecated. */ struct _xmlElement { /** application data */ @@ -360,18 +377,18 @@ struct _xmlElement { struct _xmlDoc *doc; /** element type */ - xmlElementTypeVal etype; + xmlElementTypeVal etype XML_DEPRECATED_MEMBER; /** allowed element content */ - xmlElementContent *content; + xmlElementContent *content XML_DEPRECATED_MEMBER; /** list of declared attributes */ - xmlAttribute *attributes; + xmlAttribute *attributes XML_DEPRECATED_MEMBER; /** namespace prefix if any */ - const xmlChar *prefix; + const xmlChar *prefix XML_DEPRECATED_MEMBER; #ifdef LIBXML_REGEXP_ENABLED /** validating regexp */ - xmlRegexp *contModel; + xmlRegexp *contModel XML_DEPRECATED_MEMBER; #else - void *contModel; + void *contModel XML_DEPRECATED_MEMBER; #endif }; @@ -407,7 +424,7 @@ struct _xmlNs { /** application data */ void *_private; /** normally an xmlDoc */ - struct _xmlDoc *context; + struct _xmlDoc *context XML_DEPRECATED_MEMBER; }; typedef struct _xmlDtd xmlDtd; @@ -415,6 +432,9 @@ typedef xmlDtd *xmlDtdPtr; /** * An XML DTD, as defined by