From: Luca Padovani Date: Sat, 10 Nov 2001 19:15:55 +0000 (+0000) Subject: - added method to check for an attribute in a given namespace X-Git-Tag: v0_1_3~1 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=5868bef6637af919fbb48a83c24268bb85bdef6a;p=helm.git - added method to check for an attribute in a given namespace --- diff --git a/helm/minidom/configure.in b/helm/minidom/configure.in index 385ba052f..7dfa2b6e7 100644 --- a/helm/minidom/configure.in +++ b/helm/minidom/configure.in @@ -3,7 +3,7 @@ AC_INIT(minidom.c) MINIDOM_MAJOR_VERSION=0 MINIDOM_MINOR_VERSION=1 -MINIDOM_MICRO_VERSION=2 +MINIDOM_MICRO_VERSION=3 MINIDOM_VERSION=$MINIDOM_MAJOR_VERSION.$MINIDOM_MINOR_VERSION.$MINIDOM_MICRO_VERSION MINIDOM_VERSION_INFO=`expr $MINIDOM_MAJOR_VERSION + $MINIDOM_MINOR_VERSION`:$MINIDOM_MICRO_VERSION:$MINIDOM_MINOR_VERSION diff --git a/helm/minidom/minidom.c b/helm/minidom/minidom.c index ef0d1f34b..54f56a295 100644 --- a/helm/minidom/minidom.c +++ b/helm/minidom/minidom.c @@ -258,6 +258,19 @@ mdom_node_has_attribute(mDOMNodeRef node, mDOMConstStringRef name) #endif /* HAVE_LIBXML2 */ } +gboolean +mdom_node_has_attribute_ns(mDOMNodeRef node, mDOMConstStringRef name, mDOMConstStringRef uri) +{ + g_return_val_if_fail(node != NULL, FALSE); + g_return_val_if_fail(name != NULL, FALSE); + g_return_val_if_fail(uri != NULL, FALSE); +#ifdef HAVE_LIBXML2 + return (xmlHasNsProp(node, name, uri) != NULL) ? TRUE : FALSE; +#else + return FALSE; +#endif /* HAVE_LIBXML2 */ +} + mDOMStringRef mdom_node_get_content(mDOMNodeRef node) { diff --git a/helm/minidom/minidom.h b/helm/minidom/minidom.h index 15268a3f6..976d954cb 100644 --- a/helm/minidom/minidom.h +++ b/helm/minidom/minidom.h @@ -80,6 +80,7 @@ extern "C" { mDOMStringRef mdom_node_get_attribute(mDOMNodeRef, mDOMConstStringRef); mDOMStringRef mdom_node_get_attribute_ns(mDOMNodeRef, mDOMConstStringRef, mDOMConstStringRef); gboolean mdom_node_has_attribute(mDOMNodeRef, mDOMConstStringRef); + gboolean mdom_node_has_attribute_ns(mDOMNodeRef, mDOMConstStringRef, mDOMConstStringRef); mDOMStringRef mdom_node_get_content(mDOMNodeRef); mDOMNodeRef mdom_node_get_parent(mDOMNodeRef); mDOMNodeRef mdom_node_get_prev_sibling(mDOMNodeRef);