mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-07 06:43:02 +03:00
grrr ... namespace is a C++ reserved keyword Daniel
* tree.[ch]: grrr ... namespace is a C++ reserved keyword Daniel
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
Tue Jun 12 08:09:46 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* tree.[ch]: grrr ... namespace is a C++ reserved keyword
|
||||||
|
|
||||||
Tue Jun 12 06:29:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Tue Jun 12 06:29:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* libxml.h: fixed an error in last commit
|
* libxml.h: fixed an error in last commit
|
||||||
|
@@ -669,7 +669,7 @@ xmlAttrPtr xmlHasProp (xmlNodePtr node,
|
|||||||
const xmlChar *name);
|
const xmlChar *name);
|
||||||
xmlAttrPtr xmlHasNsProp (xmlNodePtr node,
|
xmlAttrPtr xmlHasNsProp (xmlNodePtr node,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
const xmlChar *namespace);
|
const xmlChar *nameSpace);
|
||||||
xmlAttrPtr xmlSetNsProp (xmlNodePtr node,
|
xmlAttrPtr xmlSetNsProp (xmlNodePtr node,
|
||||||
xmlNsPtr ns,
|
xmlNsPtr ns,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
|
22
tree.c
22
tree.c
@@ -4268,7 +4268,7 @@ xmlHasProp(xmlNodePtr node, const xmlChar *name) {
|
|||||||
* xmlHasNsProp:
|
* xmlHasNsProp:
|
||||||
* @node: the node
|
* @node: the node
|
||||||
* @name: the attribute name
|
* @name: the attribute name
|
||||||
* @namespace: the URI of the namespace
|
* @nameSpace: the URI of the namespace
|
||||||
*
|
*
|
||||||
* Search for an attribute associated to a node
|
* Search for an attribute associated to a node
|
||||||
* This attribute has to be anchored in the namespace specified.
|
* This attribute has to be anchored in the namespace specified.
|
||||||
@@ -4280,7 +4280,7 @@ xmlHasProp(xmlNodePtr node, const xmlChar *name) {
|
|||||||
* if neither was found.
|
* if neither was found.
|
||||||
*/
|
*/
|
||||||
xmlAttrPtr
|
xmlAttrPtr
|
||||||
xmlHasNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *namespace) {
|
xmlHasNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
|
||||||
xmlAttrPtr prop;
|
xmlAttrPtr prop;
|
||||||
xmlDocPtr doc;
|
xmlDocPtr doc;
|
||||||
xmlNsPtr ns;
|
xmlNsPtr ns;
|
||||||
@@ -4289,7 +4289,7 @@ xmlHasNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *namespace) {
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
||||||
prop = node->properties;
|
prop = node->properties;
|
||||||
if (namespace == NULL)
|
if (nameSpace == NULL)
|
||||||
return(xmlHasProp(node, name));
|
return(xmlHasProp(node, name));
|
||||||
while (prop != NULL) {
|
while (prop != NULL) {
|
||||||
/*
|
/*
|
||||||
@@ -4301,9 +4301,9 @@ xmlHasNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *namespace) {
|
|||||||
*/
|
*/
|
||||||
if ((xmlStrEqual(prop->name, name)) &&
|
if ((xmlStrEqual(prop->name, name)) &&
|
||||||
(((prop->ns == NULL) && (node->ns != NULL) &&
|
(((prop->ns == NULL) && (node->ns != NULL) &&
|
||||||
(xmlStrEqual(node->ns->href, namespace))) ||
|
(xmlStrEqual(node->ns->href, nameSpace))) ||
|
||||||
((prop->ns != NULL) &&
|
((prop->ns != NULL) &&
|
||||||
(xmlStrEqual(prop->ns->href, namespace))))) {
|
(xmlStrEqual(prop->ns->href, nameSpace))))) {
|
||||||
return(prop);
|
return(prop);
|
||||||
}
|
}
|
||||||
prop = prop->next;
|
prop = prop->next;
|
||||||
@@ -4328,7 +4328,7 @@ xmlHasNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *namespace) {
|
|||||||
* The DTD declaration only allows a prefix search
|
* The DTD declaration only allows a prefix search
|
||||||
*/
|
*/
|
||||||
ns = xmlSearchNs(doc, node, attrDecl->prefix);
|
ns = xmlSearchNs(doc, node, attrDecl->prefix);
|
||||||
if ((ns != NULL) && (xmlStrEqual(ns->href, namespace)))
|
if ((ns != NULL) && (xmlStrEqual(ns->href, nameSpace)))
|
||||||
return((xmlAttrPtr) attrDecl);
|
return((xmlAttrPtr) attrDecl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4393,7 +4393,7 @@ xmlGetProp(xmlNodePtr node, const xmlChar *name) {
|
|||||||
* xmlGetNsProp:
|
* xmlGetNsProp:
|
||||||
* @node: the node
|
* @node: the node
|
||||||
* @name: the attribute name
|
* @name: the attribute name
|
||||||
* @namespace: the URI of the namespace
|
* @nameSpace: the URI of the namespace
|
||||||
*
|
*
|
||||||
* Search and get the value of an attribute associated to a node
|
* Search and get the value of an attribute associated to a node
|
||||||
* This attribute has to be anchored in the namespace specified.
|
* This attribute has to be anchored in the namespace specified.
|
||||||
@@ -4405,7 +4405,7 @@ xmlGetProp(xmlNodePtr node, const xmlChar *name) {
|
|||||||
* It's up to the caller to free the memory.
|
* It's up to the caller to free the memory.
|
||||||
*/
|
*/
|
||||||
xmlChar *
|
xmlChar *
|
||||||
xmlGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *namespace) {
|
xmlGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
|
||||||
xmlAttrPtr prop;
|
xmlAttrPtr prop;
|
||||||
xmlDocPtr doc;
|
xmlDocPtr doc;
|
||||||
xmlNsPtr ns;
|
xmlNsPtr ns;
|
||||||
@@ -4414,7 +4414,7 @@ xmlGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *namespace) {
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
||||||
prop = node->properties;
|
prop = node->properties;
|
||||||
if (namespace == NULL)
|
if (nameSpace == NULL)
|
||||||
return(xmlGetProp(node, name));
|
return(xmlGetProp(node, name));
|
||||||
while (prop != NULL) {
|
while (prop != NULL) {
|
||||||
/*
|
/*
|
||||||
@@ -4424,7 +4424,7 @@ xmlGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *namespace) {
|
|||||||
*/
|
*/
|
||||||
if ((xmlStrEqual(prop->name, name)) &&
|
if ((xmlStrEqual(prop->name, name)) &&
|
||||||
((prop->ns != NULL) &&
|
((prop->ns != NULL) &&
|
||||||
(xmlStrEqual(prop->ns->href, namespace)))) {
|
(xmlStrEqual(prop->ns->href, nameSpace)))) {
|
||||||
xmlChar *ret;
|
xmlChar *ret;
|
||||||
|
|
||||||
ret = xmlNodeListGetString(node->doc, prop->children, 1);
|
ret = xmlNodeListGetString(node->doc, prop->children, 1);
|
||||||
@@ -4453,7 +4453,7 @@ xmlGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *namespace) {
|
|||||||
* The DTD declaration only allows a prefix search
|
* The DTD declaration only allows a prefix search
|
||||||
*/
|
*/
|
||||||
ns = xmlSearchNs(doc, node, attrDecl->prefix);
|
ns = xmlSearchNs(doc, node, attrDecl->prefix);
|
||||||
if ((ns != NULL) && (xmlStrEqual(ns->href, namespace)))
|
if ((ns != NULL) && (xmlStrEqual(ns->href, nameSpace)))
|
||||||
return(xmlStrdup(attrDecl->defaultValue));
|
return(xmlStrdup(attrDecl->defaultValue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
tree.h
2
tree.h
@@ -669,7 +669,7 @@ xmlAttrPtr xmlHasProp (xmlNodePtr node,
|
|||||||
const xmlChar *name);
|
const xmlChar *name);
|
||||||
xmlAttrPtr xmlHasNsProp (xmlNodePtr node,
|
xmlAttrPtr xmlHasNsProp (xmlNodePtr node,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
const xmlChar *namespace);
|
const xmlChar *nameSpace);
|
||||||
xmlAttrPtr xmlSetNsProp (xmlNodePtr node,
|
xmlAttrPtr xmlSetNsProp (xmlNodePtr node,
|
||||||
xmlNsPtr ns,
|
xmlNsPtr ns,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
|
Reference in New Issue
Block a user