summaryrefslogtreecommitdiffstats
path: root/lasso/xml/dst_query_response.c
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2004-12-20 17:26:13 +0000
committerFrederic Peters <fpeters@entrouvert.com>2004-12-20 17:26:13 +0000
commit723a4ee54fe3101d803c861e69a513d82b223d1a (patch)
tree77a19b6d856c9b480bd2fe0967b786e0d01103df /lasso/xml/dst_query_response.c
parent45cffc9121c5dfaa4f695995a879dd6ce80d53d9 (diff)
downloadlasso-723a4ee54fe3101d803c861e69a513d82b223d1a.tar.gz
lasso-723a4ee54fe3101d803c861e69a513d82b223d1a.tar.xz
lasso-723a4ee54fe3101d803c861e69a513d82b223d1a.zip
correctly sets namespace on Query and QueryResponse Personal Profile nodes.
Diffstat (limited to 'lasso/xml/dst_query_response.c')
-rw-r--r--lasso/xml/dst_query_response.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lasso/xml/dst_query_response.c b/lasso/xml/dst_query_response.c
index 12e74295..8ee04f8c 100644
--- a/lasso/xml/dst_query_response.c
+++ b/lasso/xml/dst_query_response.c
@@ -71,16 +71,17 @@ static LassoNodeClass *parent_class = NULL;
static void
insure_namespace(xmlNode *xmlnode, xmlNs *ns)
{
- /* insure children are kept in same namespace */
xmlNode *t;
t = xmlnode->children;
+ xmlSetNs(xmlnode, ns);
while (t) {
if (t->type != XML_ELEMENT_NODE) {
t = t->next;
continue;
}
- xmlSetNs(xmlnode, ns);
+ if (t->ns == NULL)
+ xmlSetNs(xmlnode, ns);
insure_namespace(t, ns);
t = t->next;
}
@@ -93,9 +94,8 @@ get_xmlNode(LassoNode *node, gboolean lasso_dump)
xmlNs *ns;
xmlnode = parent_class->get_xmlNode(node, lasso_dump);
- ns = xmlNewNs(xmlnode, LASSO_DST_QUERY_RESPONSE(node)->hrefServiceType,
- LASSO_DST_QUERY_RESPONSE(node)->prefixServiceType);
- xmlSetNs(xmlnode, ns);
+ ns = xmlNewNs(NULL, LASSO_DST_QUERY_RESPONSE(node)->hrefServiceType,
+ LASSO_DST_QUERY_RESPONSE(node)->prefixServiceType);
insure_namespace(xmlnode, ns);
return xmlnode;