code comments to clarify when/why base_path is needed at parse time when loading from a string

This commit is contained in:
Dane Springmeyer 2014-08-20 13:53:25 -07:00
parent b9060c038c
commit 22117c6c64
2 changed files with 3 additions and 2 deletions

View file

@ -107,7 +107,7 @@ public:
base_path + "': file or directory does not exist");
}
}
// NOTE: base_path here helps libxml2 resolve entities correctly: https://github.com/mapnik/mapnik/issues/440
xmlDocPtr doc = xmlCtxtReadMemory(ctx_, buffer.data(), buffer.length(), base_path.c_str(), encoding_, options_);
load(doc, node);

View file

@ -97,8 +97,9 @@ public:
}
}
void load_string(std::string const& buffer, xml_node &node, std::string const & base_path )
void load_string(std::string const& buffer, xml_node &node, std::string const & )
{
// Note: base_path ignored because its not relevant - only needed for xml2 to load entities (see libxml2_loader.cpp)
load_array(std::string(buffer), node);
}
private: