add xml:id support ( ref #2989 )

This commit is contained in:
artemp 2015-07-21 10:25:19 +02:00 committed by Dane Springmeyer
parent 8efaacd923
commit 8ebb9db431

View file

@ -489,7 +489,8 @@ void parse_path(svg_parser & parser, xmlTextReaderPtr reader)
{ {
xmlFree(value); xmlFree(value);
xmlChar *id_value; xmlChar *id_value;
id_value = xmlTextReaderGetAttribute(reader, BAD_CAST "id"); id_value = xmlTextReaderGetAttribute(reader, BAD_CAST "xml:id");
if (!id_value) id_value = xmlTextReaderGetAttribute(reader, BAD_CAST "id");
if (id_value) if (id_value)
{ {
std::string id_string((const char *) id_value); std::string id_string((const char *) id_value);
@ -859,7 +860,9 @@ bool parse_common_gradient(svg_parser & parser, xmlTextReaderPtr reader)
xmlChar *value; xmlChar *value;
std::string id; std::string id;
value = xmlTextReaderGetAttribute(reader, BAD_CAST "id"); value = xmlTextReaderGetAttribute(reader, BAD_CAST "xml:id");
if (!value) value = xmlTextReaderGetAttribute(reader, BAD_CAST "id");
if (value) if (value)
{ {
// start a new gradient // start a new gradient