From 399da01ae4eb5c5e3e9349bacc2063c946c3d4a1 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Tue, 11 Aug 2009 11:17:23 +0000 Subject: Merge the branches/struggleyb/libdom-remain back to trunk. svn path=/trunk/dom/; revision=9191 --- include/dom/bootstrap/implpriv.h | 42 ++++++++++++++----------------- include/dom/bootstrap/implregistry.h | 10 +++++--- include/dom/core/attr.h | 20 ++++++++------- include/dom/core/characterdata.h | 8 +++--- include/dom/core/comment.h | 18 ++++++++++++++ include/dom/core/document.h | 6 ++--- include/dom/core/element.h | 7 +++--- include/dom/core/exceptions.h | 3 ++- include/dom/core/implementation.h | 11 ++++----- include/dom/core/namednodemap.h | 9 ++++--- include/dom/core/node.h | 40 ++++++++++++++++-------------- include/dom/core/string.h | 16 ++++++++++++ include/dom/core/typeinfo.h | 48 ++++++++++++++++++++++++++++++++++++ include/dom/dom.h | 20 ++++++++------- 14 files changed, 174 insertions(+), 84 deletions(-) create mode 100644 include/dom/core/comment.h create mode 100644 include/dom/core/typeinfo.h (limited to 'include/dom') diff --git a/include/dom/bootstrap/implpriv.h b/include/dom/bootstrap/implpriv.h index c99a9d2..f6a7eb2 100644 --- a/include/dom/bootstrap/implpriv.h +++ b/include/dom/bootstrap/implpriv.h @@ -33,6 +33,7 @@ struct dom_document; struct dom_document_type; +struct lwc_context_s; /** * DOM Implementation @@ -61,8 +62,6 @@ struct dom_implementation { * \param public_id The external subset public identifier * \param system_id The external subset system identifier * \param doctype Pointer to location to receive result - * \param alloc Memory (de)allocation function - * \param pw Pointer to client-specific private data * \return DOM_NO_ERR on success, * DOM_INVALID_CHARACTER_ERR if ::qname is invalid, * DOM_NAMESPACE_ERR if ::qname is malformed, @@ -83,8 +82,8 @@ struct dom_implementation { struct dom_string *qname, struct dom_string *public_id, struct dom_string *system_id, - struct dom_document_type **doctype, - dom_alloc alloc, void *pw); + dom_alloc alloc, void *pw, struct lwc_context_s *ctx, + struct dom_document_type **doctype); /** * Create a document node @@ -94,8 +93,6 @@ struct dom_implementation { * \param qname The qualified name of the document element * \param doctype The type of document to create * \param doc Pointer to location to receive result - * \param alloc Memory (de)allocation function - * \param pw Pointer to client-specific private data * \return DOM_NO_ERR on success, * DOM_INVALID_CHARACTER_ERR if ::qname is invalid, * DOM_NAMESPACE_ERR if ::qname is malformed, or if @@ -128,8 +125,8 @@ struct dom_implementation { struct dom_string *namespace, struct dom_string *qname, struct dom_document_type *doctype, - struct dom_document **doc, - dom_alloc alloc, void *pw); + dom_alloc alloc, void *pw, struct lwc_context_s *ctx, + struct dom_document **doc); /** * Retrieve a specialized object which implements the specified @@ -139,8 +136,6 @@ struct dom_implementation { * \param feature The requested feature * \param version The version number of the feature * \param object Pointer to location to receive object - * \param alloc Memory (de)allocation function - * \param pw Pointer to client-specific private data * \return DOM_NO_ERR. * * Any memory allocated by this call should be allocated using @@ -149,8 +144,7 @@ struct dom_implementation { dom_exception (*get_feature)(struct dom_implementation *impl, struct dom_string *feature, struct dom_string *version, - void **object, - dom_alloc alloc, void *pw); + void **object); /** * Destroy a DOM implementation instance @@ -179,10 +173,14 @@ struct dom_implementation_list_item { struct dom_implementation_list { struct dom_implementation_list_item *head; /**< Head of list */ - dom_alloc alloc; /**< Memory (de)allocation function */ - void *pw; /**< Pointer to client data */ - uint32_t refcnt; /**< Reference count */ + + /** + * Destroy a DOM implementation instance + * + * \param impl The instance to destroy + */ + void (*destroy)(struct dom_implementation_list *impllist); }; @@ -213,8 +211,7 @@ struct dom_implementation_source { */ dom_exception (*get_dom_implementation)( struct dom_string *features, - struct dom_implementation **impl, - dom_alloc alloc, void *pw); + struct dom_implementation **impl); /** * Get a list of DOM implementations that support the requested @@ -239,17 +236,16 @@ struct dom_implementation_source { */ dom_exception (*get_dom_implementation_list)( struct dom_string *features, - struct dom_implementation_list **list, - dom_alloc alloc, void *pw); + struct dom_implementation_list **list); }; /* Register a source with the DOM library */ -dom_exception dom_register_source(struct dom_implementation_source *source, - dom_alloc alloc, void *pw); +dom_exception dom_register_source(struct dom_implementation_source *source); /* Create a DOM document */ dom_exception dom_document_create(struct dom_implementation *impl, - dom_alloc alloc, void *pw, struct dom_document **doc); + dom_alloc alloc, void *pw, struct lwc_context_s *ctx, + struct dom_document **doc); /* Set a document's buffer */ void dom_document_set_buffer(struct dom_document *doc, uint8_t *buffer, @@ -259,7 +255,7 @@ void dom_document_set_buffer(struct dom_document *doc, uint8_t *buffer, dom_exception dom_document_type_create(struct dom_string *qname, struct dom_string *public_id, struct dom_string *system_id, - dom_alloc alloc, void *pw, + dom_alloc alloc, void *pw, struct lwc_context_s *ctx, struct dom_document_type **doctype); #endif diff --git a/include/dom/bootstrap/implregistry.h b/include/dom/bootstrap/implregistry.h index 1e93ea6..e14738c 100644 --- a/include/dom/bootstrap/implregistry.h +++ b/include/dom/bootstrap/implregistry.h @@ -15,16 +15,18 @@ struct dom_implementation; struct dom_implementation_list; struct dom_string; +/* Initialise the implementation registry */ +dom_exception dom_implregistry_initialise( + dom_alloc allocator, void *ptr); + /* Retrieve a DOM implementation from the registry */ dom_exception dom_implregistry_get_dom_implementation( struct dom_string *features, - struct dom_implementation **impl, - dom_alloc alloc, void *pw); + struct dom_implementation **impl); /* Get a list of DOM implementations that support the requested features */ dom_exception dom_implregistry_get_dom_implementation_list( struct dom_string *features, - struct dom_implementation_list **list, - dom_alloc alloc, void *pw); + struct dom_implementation_list **list); #endif diff --git a/include/dom/core/attr.h b/include/dom/core/attr.h index b0d98c1..7ac3956 100644 --- a/include/dom/core/attr.h +++ b/include/dom/core/attr.h @@ -27,12 +27,13 @@ typedef struct dom_attr_vtable { dom_exception (*dom_attr_get_name)(struct dom_attr *attr, struct dom_string **result); - dom_exception (*dom_attr_get_specified)(struct dom_attr *attr, bool *result); + dom_exception (*dom_attr_get_specified)(struct dom_attr *attr, + bool *result); dom_exception (*dom_attr_get_value)(struct dom_attr *attr, struct dom_string **result); dom_exception (*dom_attr_set_value)(struct dom_attr *attr, struct dom_string *value); - dom_exception (*dom_attr_get_owner)(struct dom_attr *attr, + dom_exception (*dom_attr_get_owner_element)(struct dom_attr *attr, struct dom_element **result); dom_exception (*dom_attr_get_schema_type_info)(struct dom_attr *attr, struct dom_type_info **result); @@ -48,7 +49,8 @@ static inline dom_exception dom_attr_get_name(struct dom_attr *attr, #define dom_attr_get_name(a, r) dom_attr_get_name((struct dom_attr *) (a), \ (struct dom_string **) (r)) -static inline dom_exception dom_attr_get_specified(struct dom_attr *attr, bool *result) +static inline dom_exception dom_attr_get_specified(struct dom_attr *attr, + bool *result) { return ((dom_attr_vtable *) ((dom_node *) attr)->vtable)-> dom_attr_get_specified(attr, result); @@ -74,17 +76,17 @@ static inline dom_exception dom_attr_set_value(struct dom_attr *attr, #define dom_attr_set_value(a, v) dom_attr_set_value((struct dom_attr *) (a), \ (struct dom_string *) (v)) -static inline dom_exception dom_attr_get_owner(struct dom_attr *attr, +static inline dom_exception dom_attr_get_owner_element(struct dom_attr *attr, struct dom_element **result) { return ((dom_attr_vtable *) ((dom_node *) attr)->vtable)-> - dom_attr_get_owner(attr, result); + dom_attr_get_owner_element(attr, result); } -#define dom_attr_get_owner(a, r) dom_attr_get_owner((struct dom_attr *) (a), \ - (struct dom_element **) (r)) +#define dom_attr_get_owner_element(a, r) dom_attr_get_owner_element(\ + (struct dom_attr *) (a), (struct dom_element **) (r)) -static inline dom_exception dom_attr_get_schema_type_info(struct dom_attr *attr, - struct dom_type_info **result) +static inline dom_exception dom_attr_get_schema_type_info( + struct dom_attr *attr, struct dom_type_info **result) { return ((dom_attr_vtable *) ((dom_node *) attr)->vtable)-> dom_attr_get_schema_type_info(attr, result); diff --git a/include/dom/core/characterdata.h b/include/dom/core/characterdata.h index de65c5a..745407c 100644 --- a/include/dom/core/characterdata.h +++ b/include/dom/core/characterdata.h @@ -113,7 +113,7 @@ static inline dom_exception dom_characterdata_delete_data( return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)-> dom_characterdata_delete_data(cdata, offset, count); } -#define dom_characterdata_delete_data(c, o, ct) dom_characterdata_delete_data( \ +#define dom_characterdata_delete_data(c, o, ct) dom_characterdata_delete_data(\ (struct dom_characterdata *) (c), (unsigned long) (o), \ (unsigned long) (ct)) @@ -126,8 +126,8 @@ static inline dom_exception dom_characterdata_replace_data( data); } #define dom_characterdata_replace_data(c, o, ct, d) \ - dom_characterdata_replace_data((struct dom_characterdata *) (c),\ - (unsigned long) (o), (unsigned long) (ct), \ - (struct dom_string *) (d)) + dom_characterdata_replace_data(\ + (struct dom_characterdata *) (c), (unsigned long) (o),\ + (unsigned long) (ct), (struct dom_string *) (d)) #endif diff --git a/include/dom/core/comment.h b/include/dom/core/comment.h new file mode 100644 index 0000000..43b48c2 --- /dev/null +++ b/include/dom/core/comment.h @@ -0,0 +1,18 @@ +/* + * This file is part of libdom. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2009 Bo Yang + */ + +#ifndef dom_core_comment_h_ +#define dom_core_comment_h_ + +#include + +#include +#include + +typedef struct dom_comment dom_comment; + +#endif diff --git a/include/dom/core/document.h b/include/dom/core/document.h index 193c084..1fe9752 100644 --- a/include/dom/core/document.h +++ b/include/dom/core/document.h @@ -9,6 +9,8 @@ #define dom_core_document_h_ #include +#include +#include #include #include @@ -29,6 +31,7 @@ struct dom_nodelist; struct dom_processing_instruction; struct dom_string; struct dom_text; +struct lwc_string_s; typedef struct dom_document dom_document; @@ -114,9 +117,6 @@ typedef struct dom_document_vtable { struct dom_string *qname, struct dom_node **result); } dom_document_vtable; -dom_exception dom_document_create_string(struct dom_document *doc, - const uint8_t *data, size_t len, struct dom_string **result); - static inline dom_exception dom_document_get_doctype(struct dom_document *doc, struct dom_document_type **result) { diff --git a/include/dom/core/element.h b/include/dom/core/element.h index c56e32c..4cffa2c 100644 --- a/include/dom/core/element.h +++ b/include/dom/core/element.h @@ -46,8 +46,9 @@ typedef struct dom_element_vtable { struct dom_nodelist **result); dom_exception (*dom_element_get_attribute_ns)( struct dom_element *element, - struct dom_string *namespace, - struct dom_string *localname, struct dom_string **value); + struct dom_string *namespace, + struct dom_string *localname, + struct dom_string **value); dom_exception (*dom_element_set_attribute_ns)( struct dom_element *element, struct dom_string *namespace, struct dom_string *qname, @@ -211,7 +212,7 @@ static inline dom_exception dom_element_remove_attribute_ns( dom_element_remove_attribute_ns(element, namespace, localname); } -#define dom_element_remove_attribute_ns(e, n, l, v) \ +#define dom_element_remove_attribute_ns(e, n, l) \ dom_element_remove_attribute_ns((dom_element *) (e), \ (struct dom_string *) (n), (struct dom_string *) (l)) diff --git a/include/dom/core/exceptions.h b/include/dom/core/exceptions.h index 18a2b6e..fc5e247 100644 --- a/include/dom/core/exceptions.h +++ b/include/dom/core/exceptions.h @@ -28,7 +28,8 @@ typedef enum { DOM_INVALID_ACCESS_ERR = 15, DOM_VALIDATION_ERR = 16, DOM_TYPE_MISMATCH_ERR = 17, - DOM_NO_MEM_ERR = (1<<16) /* our own internal error */ + DOM_NO_MEM_ERR = (1<<16) + /* our own internal error */ } dom_exception; #endif diff --git a/include/dom/core/implementation.h b/include/dom/core/implementation.h index d8959e6..cb95f84 100644 --- a/include/dom/core/implementation.h +++ b/include/dom/core/implementation.h @@ -30,20 +30,19 @@ dom_exception dom_implementation_has_feature( dom_exception dom_implementation_create_document_type( struct dom_implementation *impl, struct dom_string *qname, struct dom_string *public_id, struct dom_string *system_id, - struct dom_document_type **doctype, - dom_alloc alloc, void *pw); + dom_alloc alloc, void *pw, struct lwc_context_s *ctx, + struct dom_document_type **doctype); dom_exception dom_implementation_create_document( struct dom_implementation *impl, struct dom_string *namespace, struct dom_string *qname, struct dom_document_type *doctype, - struct dom_document **doc, - dom_alloc alloc, void *pw); + dom_alloc alloc, void *pw, struct lwc_context_s *ctx, + struct dom_document **doc); dom_exception dom_implementation_get_feature( struct dom_implementation *impl, struct dom_string *feature, struct dom_string *version, - void **object, - dom_alloc alloc, void *pw); + void **object); #endif diff --git a/include/dom/core/namednodemap.h b/include/dom/core/namednodemap.h index fd2b754..a39983e 100644 --- a/include/dom/core/namednodemap.h +++ b/include/dom/core/namednodemap.h @@ -43,7 +43,7 @@ dom_exception _dom_namednodemap_remove_named_item( #define dom_namednodemap_remove_named_item(m, n, r) \ _dom_namednodemap_remove_named_item((dom_namednodemap *) (m), \ - (dom_string *) (n), (dom_node **) (n)) + (dom_string *) (n), (dom_node **) (r)) dom_exception _dom_namednodemap_item(struct dom_namednodemap *map, @@ -60,7 +60,7 @@ dom_exception _dom_namednodemap_get_named_item_ns( #define dom_namednodemap_get_named_item_ns(m, n, l, r) \ _dom_namednodemap_get_named_item_ns((dom_namednodemap *) (m), \ - (dom_string *) (n), (dom_string *) (l), (dom_node **) (n)) + (dom_string *) (n), (dom_string *) (l), (dom_node **) (r)) dom_exception _dom_namednodemap_set_named_item_ns( @@ -77,7 +77,8 @@ dom_exception _dom_namednodemap_remove_named_item_ns( struct dom_string *localname, struct dom_node **node); #define dom_namednodemap_remove_named_item_ns(m, n, l, r) \ - _dom_namednodemap_remove_named_item_ns((dom_namednodemap *) (m), \ - (dom_string *) (n), (dom_string *) (l), (dom_node **) (r)) + _dom_namednodemap_remove_named_item_ns(\ + (dom_namednodemap *) (m), (dom_string *) (n),\ + (dom_string *) (l), (dom_node **) (r)) #endif diff --git a/include/dom/core/node.h b/include/dom/core/node.h index f525d0b..5e2d89a 100644 --- a/include/dom/core/node.h +++ b/include/dom/core/node.h @@ -127,7 +127,7 @@ typedef struct dom_node_vtable { dom_node_internal **result); dom_exception (*dom_node_normalize)(dom_node_internal *node); dom_exception (*dom_node_is_supported)(dom_node_internal *node, - struct dom_string *feature, dom_node_internal *version, + struct dom_string *feature, struct dom_string *version, bool *result); dom_exception (*dom_node_get_namespace)(dom_node_internal *node, struct dom_string **result); @@ -250,10 +250,11 @@ static inline dom_exception dom_node_get_last_child(struct dom_node *node, #define dom_node_get_last_child(n, r) dom_node_get_last_child( \ (dom_node *) (n), (dom_node **) (r)) -static inline dom_exception dom_node_get_previous_sibling(struct dom_node *node, - dom_node **result) +static inline dom_exception dom_node_get_previous_sibling( + struct dom_node *node, dom_node **result) { - return ((dom_node_vtable *) node->vtable)->dom_node_get_previous_sibling( + return ((dom_node_vtable *) node->vtable)-> + dom_node_get_previous_sibling( (dom_node_internal *) node, (dom_node_internal **) result); } @@ -367,16 +368,16 @@ static inline dom_exception dom_node_normalize(struct dom_node *node) #define dom_node_normalize(n) dom_node_normalize((dom_node *) (n)) static inline dom_exception dom_node_is_supported(struct dom_node *node, - struct dom_string *feature, struct dom_node *version, + struct dom_string *feature, struct dom_string *version, bool *result) { return ((dom_node_vtable *) node->vtable)->dom_node_is_supported( (dom_node_internal *) node, feature, - (dom_node_internal *) version, result); + version, result); } #define dom_node_is_supported(n, f, v, r) dom_node_is_supported( \ - (dom_node *) (n), (struct dom_string *) (f), (dom_node *) (v),\ - (bool *) (r)) + (dom_node *) (n), (struct dom_string *) (f), \ + (struct dom_string *) (v), (bool *) (r)) static inline dom_exception dom_node_get_namespace(struct dom_node *node, struct dom_string **result) @@ -385,7 +386,7 @@ static inline dom_exception dom_node_get_namespace(struct dom_node *node, (dom_node_internal *) node, result); } #define dom_node_get_namespace(n, r) dom_node_get_namespace((dom_node *) (n), \ - (struct dom_string *) (r)) + (struct dom_string **) (r)) static inline dom_exception dom_node_get_prefix(struct dom_node *node, struct dom_string **result) @@ -394,7 +395,7 @@ static inline dom_exception dom_node_get_prefix(struct dom_node *node, (dom_node_internal *) node, result); } #define dom_node_get_prefix(n, r) dom_node_get_prefix((dom_node *) (n), \ - (struct dom_string *) (r)) + (struct dom_string **) (r)) static inline dom_exception dom_node_set_prefix(struct dom_node *node, struct dom_string *prefix) @@ -412,7 +413,7 @@ static inline dom_exception dom_node_get_local_name(struct dom_node *node, (dom_node_internal *) node, result); } #define dom_node_get_local_name(n, r) dom_node_get_local_name((dom_node *) (n),\ - (struct dom_string *) (r)) + (struct dom_string **) (r)) static inline dom_exception dom_node_has_attributes(struct dom_node *node, bool *result) @@ -436,9 +437,10 @@ static inline dom_exception dom_node_compare_document_position( struct dom_node *node, struct dom_node *other, uint16_t *result) { - return ((dom_node_vtable *) node->vtable)->dom_node_compare_document_position( - (dom_node_internal *) node, (dom_node_internal *) other, - result); + return ((dom_node_vtable *) node->vtable)-> + dom_node_compare_document_position( + (dom_node_internal *) node, + (dom_node_internal *) other, result); } #define dom_node_compare_document_position(n, o, r) \ dom_node_compare_document_position((dom_node *) (n), \ @@ -483,13 +485,15 @@ static inline dom_exception dom_node_lookup_prefix(struct dom_node *node, (dom_node *) (n), (struct dom_string *) (ns), \ (struct dom_string **) (r)) -static inline dom_exception dom_node_is_default_namespace(struct dom_node *node, - struct dom_string *namespace, bool *result) +static inline dom_exception dom_node_is_default_namespace( + struct dom_node *node, struct dom_string *namespace, + bool *result) { - return ((dom_node_vtable *) node->vtable)->dom_node_is_default_namespace( + return ((dom_node_vtable *) node->vtable)-> + dom_node_is_default_namespace( (dom_node_internal *) node, namespace, result); } -#define dom_node_is_default_namesapce(n, ns, r) dom_node_is_default_namespace(\ +#define dom_node_is_default_namespace(n, ns, r) dom_node_is_default_namespace(\ (dom_node *) (n), (struct dom_string *) (ns), (bool *) (r)) static inline dom_exception dom_node_lookup_namespace(struct dom_node *node, diff --git a/include/dom/core/string.h b/include/dom/core/string.h index 37d78d6..2502623 100644 --- a/include/dom/core/string.h +++ b/include/dom/core/string.h @@ -10,10 +10,12 @@ #include #include +#include #include #include + typedef struct dom_string dom_string; /* Claim a reference on a DOM string */ @@ -25,6 +27,14 @@ void dom_string_unref(struct dom_string *str); dom_exception dom_string_create(dom_alloc alloc, void *pw, const uint8_t *ptr, size_t len, struct dom_string **str); +/* Clone a dom_string */ +dom_exception dom_string_clone(dom_alloc alloc, void *pw, + struct dom_string *str, struct dom_string **ret); + +/* Get the internal lwc_string */ +dom_exception dom_string_get_intern(struct dom_string *str, + struct lwc_context_s **ctx, struct lwc_string_s **lwcstr); + /* Case sensitively compare two DOM strings */ int dom_string_cmp(struct dom_string *s1, struct dom_string *s2); /* Case insensitively compare two DOM strings */ @@ -38,6 +48,12 @@ uint32_t dom_string_rindex(struct dom_string *str, uint32_t chr); /* Get the length, in characters, of a dom string */ uint32_t dom_string_length(struct dom_string *str); +/* Get the UCS-4 character at position index, the index should be in + * [0, length), and length can be get by calling dom_string_length + */ +dom_exception dom_string_at(struct dom_string *str, uint32_t index, + uint32_t *ch); + /* Concatenate two dom strings */ dom_exception dom_string_concat(struct dom_string *s1, struct dom_string *s2, struct dom_string **result); diff --git a/include/dom/core/typeinfo.h b/include/dom/core/typeinfo.h new file mode 100644 index 0000000..f285799 --- /dev/null +++ b/include/dom/core/typeinfo.h @@ -0,0 +1,48 @@ +/* + * This file is part of libdom. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2009 Bo Yang + */ + +#ifndef dom_core_typeinfo_h_ +#define dom_core_typeinfo_h_ + +#include + +#include + +struct dom_string; + +typedef struct dom_type_info dom_type_info; + +typedef enum { + DOM_TYPE_INFO_DERIVATION_RESTRICTION = 0x00000001, + DOM_TYPE_INFO_DERIVATION_EXTENSION = 0x00000002, + DOM_TYPE_INFO_DERIVATION_UNION = 0x00000004, + DOM_TYPE_INFO_DERIVATION_LIST = 0x00000008 +} dom_type_info_derivation_method; + +dom_exception _dom_type_info_get_type_name(dom_type_info *ti, + struct dom_string **ret); +#define dom_type_info_get_type_name(t, r) _dom_type_info_get_type_name( \ + (dom_type_info *) (t), (struct dom_string **) (r)) + + +dom_exception _dom_type_info_get_type_namespace(dom_type_info *ti, + struct dom_string **ret); +#define dom_type_info_get_type_namespace(t, r) \ + _dom_type_info_get_type_namespace((dom_type_info *) (t),\ + (struct dom_string **) (r)) + + +dom_exception _dom_type_info_is_derived(dom_type_info *ti, + struct dom_string *namespace, struct dom_string *name, + dom_type_info_derivation_method method, bool *ret); +#define dom_type_info_is_derived(t, s, n, m, r) _dom_type_info_is_derived(\ + (dom_type_info *) (t), (struct dom_string *) (s), \ + (struct dom_string *) (n), \ + (dom_type_info_derivation_method) (m), (bool *) (r)) + + +#endif diff --git a/include/dom/dom.h b/include/dom/dom.h index 286a51b..7a882b8 100644 --- a/include/dom/dom.h +++ b/include/dom/dom.h @@ -38,17 +38,19 @@ #include #include #include +#include +#include typedef enum dom_namespace { - DOM_NAMESPACE_NULL = 0, - DOM_NAMESPACE_HTML = 1, - DOM_NAMESPACE_MATHML = 2, - DOM_NAMESPACE_SVG = 3, - DOM_NAMESPACE_XLINK = 4, - DOM_NAMESPACE_XML = 5, - DOM_NAMESPACE_XMLNS = 6, - - DOM_NAMESPACE_COUNT = 7 + DOM_NAMESPACE_NULL = 0, + DOM_NAMESPACE_HTML = 1, + DOM_NAMESPACE_MATHML = 2, + DOM_NAMESPACE_SVG = 3, + DOM_NAMESPACE_XLINK = 4, + DOM_NAMESPACE_XML = 5, + DOM_NAMESPACE_XMLNS = 6, + + DOM_NAMESPACE_COUNT = 7 } dom_namespace; extern struct dom_string *dom_namespaces[DOM_NAMESPACE_COUNT]; -- cgit v1.2.3