summaryrefslogtreecommitdiff
path: root/source/xps/xps-common.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-04-16 16:10:57 +0200
committerTor Andersson <tor.andersson@artifex.com>2014-04-23 14:31:33 +0200
commit648ae8838f35f45e57b9a41f41f30a3b6ade3037 (patch)
treeb3139c09ed8b9e53e2fa2cbfabb215c7daf0cbb9 /source/xps/xps-common.c
parent959f70ff9e15d77b043bf49d8065dafbf0757903 (diff)
downloadmupdf-648ae8838f35f45e57b9a41f41f30a3b6ade3037.tar.xz
Fix bug 693580 by skipping xml tag namespace prefixes.
fts_5904.xps and fts_5905.xps use namespace prefixes. Work around that by ignoring the namespace prefix for tag names. A more robust solution would be to expand or record the tag and attribute namespaces in the fz_xml node structure, but that's a overkill for our current needs.
Diffstat (limited to 'source/xps/xps-common.c')
-rw-r--r--source/xps/xps-common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/xps/xps-common.c b/source/xps/xps-common.c
index 32a30baa..63e4dc40 100644
--- a/source/xps/xps-common.c
+++ b/source/xps/xps-common.c
@@ -13,7 +13,7 @@ xps_lookup_alternate_content(fz_xml *node)
{
for (node = fz_xml_down(node); node; node = fz_xml_next(node))
{
- if (!strcmp(fz_xml_tag(node), "mc:Choice") && fz_xml_att(node, "Requires"))
+ if (!strcmp(fz_xml_tag(node), "Choice") && fz_xml_att(node, "Requires"))
{
char list[64];
char *next = list, *item;
@@ -22,7 +22,7 @@ xps_lookup_alternate_content(fz_xml *node)
if (!item)
return fz_xml_down(node);
}
- else if (!strcmp(fz_xml_tag(node), "mc:Fallback"))
+ else if (!strcmp(fz_xml_tag(node), "Fallback"))
return fz_xml_down(node);
}
return NULL;
@@ -57,7 +57,7 @@ xps_parse_element(xps_document *doc, const fz_matrix *ctm, const fz_rect *area,
xps_parse_glyphs(doc, ctm, base_uri, dict, node);
if (!strcmp(fz_xml_tag(node), "Canvas"))
xps_parse_canvas(doc, ctm, area, base_uri, dict, node);
- if (!strcmp(fz_xml_tag(node), "mc:AlternateContent"))
+ if (!strcmp(fz_xml_tag(node), "AlternateContent"))
{
node = xps_lookup_alternate_content(node);
if (node)