- Ignore children of namespaced nodes too
This commit is contained in:
parent
a37deacbbf
commit
99af79d6c8
@ -1,8 +1,7 @@
|
||||
diff --git a/dbus/dbus-gparser.c b/dbus/dbus-gparser.c
|
||||
index f296f96..cdd4e53 100644
|
||||
--- a/dbus/dbus-gparser.c
|
||||
+++ b/dbus/dbus-gparser.c
|
||||
@@ -128,13 +128,17 @@ locate_attributes (const char *element_name,
|
||||
diff -up dbus-glib-0.73/dbus/dbus-gparser.c.ignore-namespaces dbus-glib-0.73/dbus/dbus-gparser.c
|
||||
--- dbus-glib-0.73/dbus/dbus-gparser.c.ignore-namespaces 2006-09-27 08:27:24.000000000 -0400
|
||||
+++ dbus-glib-0.73/dbus/dbus-gparser.c 2008-03-13 08:54:14.000000000 -0400
|
||||
@@ -128,13 +128,17 @@ locate_attributes (const char *element_
|
||||
|
||||
if (!found)
|
||||
{
|
||||
@ -35,7 +34,7 @@ index f296f96..cdd4e53 100644
|
||||
};
|
||||
|
||||
Parser*
|
||||
@@ -791,10 +796,14 @@ parser_start_element (Parser *parser,
|
||||
@@ -791,10 +796,14 @@ parser_start_element (Parser *parse
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -46,7 +45,7 @@ index f296f96..cdd4e53 100644
|
||||
+ if (strchr (element_name, ':') != NULL)
|
||||
+ /* Passthrough XML-namespaced nodes */
|
||||
+ parser->unknown_namespaced_depth += 1;
|
||||
+ else
|
||||
+ else if (parser->unknown_namespaced_depth == 0)
|
||||
+ g_set_error (error, G_MARKUP_ERROR,
|
||||
+ G_MARKUP_ERROR_PARSE,
|
||||
+ _("Element <%s> not recognized"),
|
||||
@ -54,7 +53,7 @@ index f296f96..cdd4e53 100644
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -844,6 +853,11 @@ parser_end_element (Parser *parser,
|
||||
@@ -844,6 +853,15 @@ parser_end_element (Parser *parser,
|
||||
if (parser->node_stack == NULL)
|
||||
parser->result = top; /* We are done, store the result */
|
||||
}
|
||||
@ -62,8 +61,23 @@ index f296f96..cdd4e53 100644
|
||||
+ {
|
||||
+ /* Passthrough XML-namespaced nodes */
|
||||
+ parser->unknown_namespaced_depth -= 1;
|
||||
+ }
|
||||
+ else if (parser->unknown_namespaced_depth > 0)
|
||||
+ {
|
||||
+ /* pass through unknown elements underneath a namespace */
|
||||
+ }
|
||||
else
|
||||
g_assert_not_reached (); /* should have had an error on start_element */
|
||||
|
||||
|
||||
diff -up dbus-glib-0.73/dbus/dbus-glib-tool.c.ignore-namespaces dbus-glib-0.73/dbus/dbus-glib-tool.c
|
||||
--- dbus-glib-0.73/dbus/dbus-glib-tool.c.ignore-namespaces 2008-03-13 08:31:21.000000000 -0400
|
||||
+++ dbus-glib-0.73/dbus/dbus-glib-tool.c 2008-03-13 08:32:15.000000000 -0400
|
||||
@@ -414,7 +414,7 @@ main (int argc, char **argv)
|
||||
&error);
|
||||
if (node == NULL)
|
||||
{
|
||||
- lose_gerror (_("Unable to load \"%s\""), error);
|
||||
+ lose (_("Unable to load \"%s\": %s"), filename, error->message);
|
||||
}
|
||||
else
|
||||
{
|
||||
Loading…
Reference in New Issue
Block a user