diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2014-09-02 22:51:20 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2014-09-17 12:06:07 +0200 |
commit | 76cfea4acb19ed99a31b84d1d6d3d83d1ac5f225 (patch) | |
tree | 4d6c257d8380da266af73f1332eb1f38bf3c49f7 /source/xps/xps-doc.c | |
parent | 13e335fd06789a42369d03b2cad65818014f3f79 (diff) | |
download | mupdf-76cfea4acb19ed99a31b84d1d6d3d83d1ac5f225.tar.xz |
xps: Add fz_xml_is_tag to simplify tag matching.
Diffstat (limited to 'source/xps/xps-doc.c')
-rw-r--r-- | source/xps/xps-doc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/xps/xps-doc.c b/source/xps/xps-doc.c index e2058fbc..4bcf92cb 100644 --- a/source/xps/xps-doc.c +++ b/source/xps/xps-doc.c @@ -280,7 +280,7 @@ xps_parse_metadata_imp(xps_document *doc, fz_xml *item, xps_fixdoc *fixdoc) { while (item) { - if (!strcmp(fz_xml_tag(item), "Relationship")) + if (fz_xml_is_tag(item, "Relationship")) { char *target = fz_xml_att(item, "Target"); char *type = fz_xml_att(item, "Type"); @@ -297,7 +297,7 @@ xps_parse_metadata_imp(xps_document *doc, fz_xml *item, xps_fixdoc *fixdoc) } } - if (!strcmp(fz_xml_tag(item), "DocumentReference")) + if (fz_xml_is_tag(item, "DocumentReference")) { char *source = fz_xml_att(item, "Source"); if (source) @@ -308,7 +308,7 @@ xps_parse_metadata_imp(xps_document *doc, fz_xml *item, xps_fixdoc *fixdoc) } } - if (!strcmp(fz_xml_tag(item), "PageContent")) + if (fz_xml_is_tag(item, "PageContent")) { char *source = fz_xml_att(item, "Source"); char *width_att = fz_xml_att(item, "Width"); @@ -323,7 +323,7 @@ xps_parse_metadata_imp(xps_document *doc, fz_xml *item, xps_fixdoc *fixdoc) } } - if (!strcmp(fz_xml_tag(item), "LinkTarget")) + if (fz_xml_is_tag(item, "LinkTarget")) { char *name = fz_xml_att(item, "Name"); if (name) @@ -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), "AlternateContent")) + if (fz_xml_is_tag(root, "AlternateContent")) { fz_xml *node = xps_lookup_alternate_content(root); if (!node) |