Skip to content

Instantly share code, notes, and snippets.

@ssp
Created August 31, 2012 10:09
Show Gist options
  • Save ssp/3551094 to your computer and use it in GitHub Desktop.
Save ssp/3551094 to your computer and use it in GitHub Desktop.
diff on Metaproxy’s router_flexml.cpp to allow base attributes when reading tags
--- a/src/router_flexml.cpp
+++ b/src/router_flexml.cpp
@@ -119,6 +119,8 @@ void mp::RouterFleXML::Rep::parse_xml_filters(xmlDocPtr doc,
id_value = value;
else if (name == "type")
type_value = value;
+ else if (name == "base")
+ ;// Ignore XInclude base attribute.
else
throw mp::XMLError("Only attribute id or type allowed"
" in filter element. Got " + name);
@@ -176,6 +178,8 @@ void mp::RouterFleXML::Rep::parse_xml_filters1(xmlDocPtr doc,
refid_value = value;
else if (name == "type")
type_value = value;
+ else if (name == "base")
+ ;// Ignore XInclude base attribute.
else
throw mp::XMLError("Only attribute 'refid' or 'type'"
" allowed for element 'filter'."
@@ -238,6 +242,8 @@ void mp::RouterFleXML::Rep::parse_xml_routes(xmlDocPtr doc,
if (name == "id")
id_value = value;
+ else if (name == "base")
+ ;// Ignore XInclude base attribute.
else
throw mp::XMLError("Only attribute 'id' allowed for"
" element 'route'."
@@ -343,6 +352,8 @@ void mp::RouterFleXML::Rep::parse_xml_config_dom(xmlDocPtr doc,
if (name == "route")
m_start_route = value;
+ else if (name == "base")
+ ;// Ignore XInclude base attribute.
else
throw mp::XMLError("Only attribute route allowed"
" in element 'start'. Got " + name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment