summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/fitz/xml.c6
-rw-r--r--source/xps/xps-common.c6
-rw-r--r--source/xps/xps-doc.c2
3 files changed, 10 insertions, 4 deletions
diff --git a/source/fitz/xml.c b/source/fitz/xml.c
index 34a6b51e..1dd3512f 100644
--- a/source/fitz/xml.c
+++ b/source/fitz/xml.c
@@ -169,6 +169,12 @@ static inline int iswhite(int c)
static void xml_emit_open_tag(struct parser *parser, char *a, char *b)
{
fz_xml *head, *tail;
+ char *ns;
+
+ /* skip namespace prefix */
+ for (ns = a; ns < b; ++ns)
+ if (*ns == ':')
+ a = ns + 1;
head = fz_malloc_struct(parser->ctx, fz_xml);
if (b - a > sizeof(head->name) - 1)
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)
diff --git a/source/xps/xps-doc.c b/source/xps/xps-doc.c
index af5bfe5a..5aa2604c 100644
--- a/source/xps/xps-doc.c
+++ b/source/xps/xps-doc.c
@@ -453,7 +453,7 @@ xps_load_fixed_page(xps_document *doc, xps_page *page)
if (!root)
fz_throw(doc->ctx, FZ_ERROR_GENERIC, "FixedPage missing root element");
- if (!strcmp(fz_xml_tag(root), "mc:AlternateContent"))
+ if (!strcmp(fz_xml_tag(root), "AlternateContent"))
{
fz_xml *node = xps_lookup_alternate_content(root);
if (!node)