From: Jim Evins Date: Fri, 17 Oct 2003 03:18:13 +0000 (+0000) Subject: Allow comments anytime traversing a list of child nodes. X-Git-Tag: glabels-2_3_0~574 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5a7ea2653f663ae324fb66854477600db97ee6fd;p=glabels 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 --- 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); + } } }