From 5a7ea2653f663ae324fb66854477600db97ee6fd Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Fri, 17 Oct 2003 03:18:13 +0000 Subject: [PATCH] Allow comments anytime traversing a list of child nodes. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@316 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/xml-template.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/glabels2/src/xml-template.c b/glabels2/src/xml-template.c index 1233da20..6ef101e4 100644 --- a/glabels2/src/xml-template.c +++ b/glabels2/src/xml-template.c @@ -201,7 +201,9 @@ gl_xml_template_parse_template (xmlNodePtr template_node) xml_parse_alias (node, template); } else { if (!xmlNodeIsText (node)) { - g_warning ("bad node = \"%s\"", node->name); + if (!xmlStrEqual (node->name,"comment")) { + g_warning ("bad node = \"%s\"",node->name); + } } } } @@ -241,7 +243,9 @@ xml_parse_label_rectangle (xmlNodePtr label_node, } else if (xmlStrEqual (node->name, "Markup-circle")) { xml_parse_markup_circle (node, template); } else if (!xmlNodeIsText (node)) { - g_warning ("bad node = \"%s\"", node->name); + if (!xmlStrEqual (node->name,"comment")) { + g_warning ("bad node = \"%s\"",node->name); + } } } @@ -274,7 +278,9 @@ xml_parse_label_round (xmlNodePtr label_node, } else if (xmlStrEqual (node->name, "Markup-line")) { xml_parse_markup_line (node, template); } else if (!xmlNodeIsText (node)) { - g_warning ("bad node = \"%s\"", node->name); + if (!xmlStrEqual (node->name,"comment")) { + g_warning ("bad node = \"%s\"",node->name); + } } } @@ -310,7 +316,9 @@ xml_parse_label_cd (xmlNodePtr label_node, } else if (xmlStrEqual (node->name, "Markup-line")) { xml_parse_markup_line (node, template); } else if (!xmlNodeIsText (node)) { - g_warning ("bad node = \"%s\"", node->name); + if (!xmlStrEqual (node->name,"comment")) { + g_warning ("bad node = \"%s\"",node->name); + } } } @@ -342,7 +350,9 @@ xml_parse_layout (xmlNodePtr layout_node, for (node = layout_node->xmlChildrenNode; node != NULL; node = node->next) { if (!xmlNodeIsText (node)) { - g_warning ("bad node = \"%s\"", node->name); + if (!xmlStrEqual (node->name,"comment")) { + g_warning ("bad node = \"%s\"",node->name); + } } } @@ -374,7 +384,9 @@ xml_parse_markup_margin (xmlNodePtr markup_node, for (node = markup_node->xmlChildrenNode; node != NULL; node = node->next) { if (!xmlNodeIsText (node)) { - g_warning ("bad node = \"%s\"", node->name); + if (!xmlStrEqual (node->name,"comment")) { + g_warning ("bad node = \"%s\"",node->name); + } } } @@ -405,7 +417,9 @@ xml_parse_markup_line (xmlNodePtr markup_node, for (node = markup_node->xmlChildrenNode; node != NULL; node = node->next) { if (!xmlNodeIsText (node)) { - g_warning ("bad node = \"%s\"", node->name); + if (!xmlStrEqual (node->name,"comment")) { + g_warning ("bad node = \"%s\"",node->name); + } } } @@ -435,7 +449,9 @@ xml_parse_markup_circle (xmlNodePtr markup_node, for (node = markup_node->xmlChildrenNode; node != NULL; node = node->next) { if (!xmlNodeIsText (node)) { - g_warning ("bad node = \"%s\"", node->name); + if (!xmlStrEqual (node->name,"comment")) { + g_warning ("bad node = \"%s\"",node->name); + } } } -- 2.39.5