mirror of
https://github.com/darlinghq/darling-libxml2.git
synced 2025-03-01 06:56:10 +00:00
Corbaization of the document structures, Daniel.
This commit is contained in:
parent
0bef131b72
commit
27fb07571f
@ -1,3 +1,10 @@
|
||||
Sat Oct 17 02:43:21 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||
|
||||
* tree.h, tree.c: Ok, the main objects in the tree will be native
|
||||
corba objects, it costs 8 bytes per Node, Attribute and Document
|
||||
but it simplifies the Corba integration a lot (no extra interface
|
||||
objects to allocate/free).
|
||||
|
||||
Tue Oct 13 21:46:57 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||
|
||||
* tree.h, tree.c, parser.c: added prev and doc pointers to Node,
|
||||
|
@ -1,5 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
INCLUDES = -I@srcdir@ @CORBA_CFLAGS@
|
||||
|
||||
noinst_PROGRAMS=tester
|
||||
|
||||
bin_SCRIPTS=xml-config
|
||||
@ -15,7 +17,6 @@ libxml_la_SOURCES = \
|
||||
tester.c \
|
||||
tree.c
|
||||
|
||||
|
||||
xmlincdir = $(includedir)/gnome-xml
|
||||
xmlinc_HEADERS = \
|
||||
entities.h \
|
||||
|
10
configure.in
10
configure.in
@ -36,6 +36,16 @@ AC_SUBST(XML_LIBDIR)
|
||||
AC_SUBST(XML_LIBS)
|
||||
AC_SUBST(XML_INCLUDEDIR)
|
||||
|
||||
AC_ARG_ENABLE(corba, [ --enable-corba Add Corba support (default)])
|
||||
|
||||
dnl
|
||||
dnl Corba is enabled by default
|
||||
dnl
|
||||
if test "$enable_java" = "no" ; then
|
||||
CORBA_CFLAGS="-DWITHOUT_CORBA"
|
||||
fi
|
||||
AC_SUBST(CORBA_CFLAGS)
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_STRFTIME
|
||||
AC_CHECK_FUNCS(strdup strndup strerror snprintf )
|
||||
|
@ -80,6 +80,11 @@ typedef struct xmlDtd {
|
||||
* A attribute of an XML node.
|
||||
*/
|
||||
typedef struct xmlAttr {
|
||||
#ifndef XML_WITHOUT_CORBA
|
||||
void *_private; /* for Corba, must be first ! */
|
||||
void *vepv; /* for Corba, must be next ! */
|
||||
#endif
|
||||
int type; /* XML_ATTRIBUTE_NODE, must be third ! */
|
||||
struct xmlNode *node; /* attr->node link */
|
||||
struct xmlAttr *next; /* parent->childs link */
|
||||
const CHAR *name; /* the name of the property */
|
||||
@ -105,7 +110,11 @@ typedef struct xmlAttr {
|
||||
#define XML_NOTATION_NODE 12
|
||||
|
||||
typedef struct xmlNode {
|
||||
int type; /* type number in the DTD */
|
||||
#ifndef XML_WITHOUT_CORBA
|
||||
void *_private; /* for Corba, must be first ! */
|
||||
void *vepv; /* for Corba, must be next ! */
|
||||
#endif
|
||||
int type; /* type number in the DTD, must be third ! */
|
||||
struct xmlDoc *doc; /* the containing document */
|
||||
struct xmlNode *parent; /* child->parent link */
|
||||
struct xmlNode *next; /* next sibling link */
|
||||
@ -116,13 +125,17 @@ typedef struct xmlNode {
|
||||
xmlNs *ns; /* pointer to the associated namespace */
|
||||
xmlNs *nsDef; /* namespace definitions on this node */
|
||||
CHAR *content; /* the content */
|
||||
void *servant; /* for Corba ! */
|
||||
} xmlNode, *xmlNodePtr;
|
||||
|
||||
/*
|
||||
* An XML document.
|
||||
*/
|
||||
typedef struct xmlDoc {
|
||||
#ifndef XML_WITHOUT_CORBA
|
||||
void *_private; /* for Corba, must be first ! */
|
||||
void *vepv; /* for Corba, must be next ! */
|
||||
#endif
|
||||
int type; /* XML_DOCUMENT_NODE, must be second ! */
|
||||
char *name; /* name/filename/URI of the document */
|
||||
const CHAR *version; /* the XML version string */
|
||||
const CHAR *encoding; /* encoding, if any */
|
||||
@ -132,7 +145,6 @@ typedef struct xmlDoc {
|
||||
struct xmlNs *oldNs; /* Global namespace, the old way */
|
||||
void *entities; /* Hash table for general entities if any */
|
||||
struct xmlNode *root; /* the document tree */
|
||||
void *servant; /* for Corba ! */
|
||||
} xmlDoc, *xmlDocPtr;
|
||||
|
||||
/*
|
||||
|
14
tree.c
14
tree.c
@ -277,7 +277,10 @@ xmlDocPtr xmlNewDoc(const CHAR *version) {
|
||||
cur->entities = NULL;
|
||||
cur->standalone = -1;
|
||||
cur->compression = xmlCompressMode;
|
||||
cur->servant = NULL;
|
||||
#ifndef WITHOUT_CORBA
|
||||
cur->_private = NULL;
|
||||
cur->vepv = NULL;
|
||||
#endif
|
||||
return(cur);
|
||||
}
|
||||
|
||||
@ -326,6 +329,10 @@ xmlAttrPtr xmlNewProp(xmlNodePtr node, const CHAR *name, const CHAR *value) {
|
||||
cur->value = xmlStrdup(value);
|
||||
else
|
||||
cur->value = NULL;
|
||||
#ifndef WITHOUT_CORBA
|
||||
cur->_private = NULL;
|
||||
cur->vepv = NULL;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Add it at the end to preserve parsing order ...
|
||||
@ -407,7 +414,10 @@ xmlNodePtr xmlNewNode(xmlNsPtr ns, const CHAR *name, CHAR *content) {
|
||||
cur->name = xmlStrdup(name);
|
||||
cur->ns = ns;
|
||||
cur->nsDef = NULL;
|
||||
cur->servant = NULL;
|
||||
#ifndef WITHOUT_CORBA
|
||||
cur->_private = NULL;
|
||||
cur->vepv = NULL;
|
||||
#endif
|
||||
if (content != NULL)
|
||||
cur->content = xmlStrdup(content);
|
||||
else
|
||||
|
18
tree.h
18
tree.h
@ -80,6 +80,11 @@ typedef struct xmlDtd {
|
||||
* A attribute of an XML node.
|
||||
*/
|
||||
typedef struct xmlAttr {
|
||||
#ifndef XML_WITHOUT_CORBA
|
||||
void *_private; /* for Corba, must be first ! */
|
||||
void *vepv; /* for Corba, must be next ! */
|
||||
#endif
|
||||
int type; /* XML_ATTRIBUTE_NODE, must be third ! */
|
||||
struct xmlNode *node; /* attr->node link */
|
||||
struct xmlAttr *next; /* parent->childs link */
|
||||
const CHAR *name; /* the name of the property */
|
||||
@ -105,7 +110,11 @@ typedef struct xmlAttr {
|
||||
#define XML_NOTATION_NODE 12
|
||||
|
||||
typedef struct xmlNode {
|
||||
int type; /* type number in the DTD */
|
||||
#ifndef XML_WITHOUT_CORBA
|
||||
void *_private; /* for Corba, must be first ! */
|
||||
void *vepv; /* for Corba, must be next ! */
|
||||
#endif
|
||||
int type; /* type number in the DTD, must be third ! */
|
||||
struct xmlDoc *doc; /* the containing document */
|
||||
struct xmlNode *parent; /* child->parent link */
|
||||
struct xmlNode *next; /* next sibling link */
|
||||
@ -116,13 +125,17 @@ typedef struct xmlNode {
|
||||
xmlNs *ns; /* pointer to the associated namespace */
|
||||
xmlNs *nsDef; /* namespace definitions on this node */
|
||||
CHAR *content; /* the content */
|
||||
void *servant; /* for Corba ! */
|
||||
} xmlNode, *xmlNodePtr;
|
||||
|
||||
/*
|
||||
* An XML document.
|
||||
*/
|
||||
typedef struct xmlDoc {
|
||||
#ifndef XML_WITHOUT_CORBA
|
||||
void *_private; /* for Corba, must be first ! */
|
||||
void *vepv; /* for Corba, must be next ! */
|
||||
#endif
|
||||
int type; /* XML_DOCUMENT_NODE, must be second ! */
|
||||
char *name; /* name/filename/URI of the document */
|
||||
const CHAR *version; /* the XML version string */
|
||||
const CHAR *encoding; /* encoding, if any */
|
||||
@ -132,7 +145,6 @@ typedef struct xmlDoc {
|
||||
struct xmlNs *oldNs; /* Global namespace, the old way */
|
||||
void *entities; /* Hash table for general entities if any */
|
||||
struct xmlNode *root; /* the document tree */
|
||||
void *servant; /* for Corba ! */
|
||||
} xmlDoc, *xmlDocPtr;
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user