diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2008-08-01 14:11:05 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2008-08-01 14:11:05 +0000 |
| commit | 2cb76452da1e9f89200fd9ab5fb201f6a227943a (patch) | |
| tree | 5f6c748285ba9bdbdcaec220526c8c38fd3293bf | |
| parent | 205d705b33dfe9cb1ae485c88824a6e20c7f53ba (diff) | |
* lasso/xml/xml.c: make xmlClean change namespace of properties not just of nodes
| -rw-r--r-- | lasso/xml/xml.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index 91cd4062..8d6f27f8 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -2404,12 +2404,25 @@ sameNs(xmlNs *ns1, xmlNs *ns2) } static void +xmlPropUseNsDef(xmlNs *ns, xmlNode *node) +{ + xmlAttr *attr; + + for (attr = node->properties; attr; attr = attr->next) { + if (sameNs(ns, attr->ns)) { + attr->ns = ns; + } + } +} + +static void xmlUseNsDef(xmlNs *ns, xmlNode *node) { xmlNode *t; xmlNs *ns2; xmlNs *ns3 = NULL; + xmlPropUseNsDef(ns, node); if (sameNs(ns, node->ns)) { node->ns = ns; } |
