From b6519f17bf729617279e1feb78b08ce4fd56cd5b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 19 Feb 2013 17:31:30 +0100 Subject: Bug 693639: allow OpenXPS extension and XML namespaces. Thanks to zeniko. --- xps/xps_doc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'xps') diff --git a/xps/xps_doc.c b/xps/xps_doc.c index 84d7bbd1..96eee8bc 100644 --- a/xps/xps_doc.c +++ b/xps/xps_doc.c @@ -9,6 +9,11 @@ #define REL_REQUIRED_RESOURCE_RECURSIVE \ "http://schemas.microsoft.com/xps/2005/06/required-resource#recursive" +#define REL_START_PART_OXPS \ + "http://schemas.openxps.org/oxps/v1.0/fixedrepresentation" +#define REL_DOC_STRUCTURE_OXPS \ + "http://schemas.openxps.org/oxps/v1.0/documentstructure" + static void xps_rels_for_part(char *buf, char *name, int buflen) { @@ -283,9 +288,9 @@ xps_parse_metadata_imp(xps_document *doc, fz_xml *item, xps_fixdoc *fixdoc) { char tgtbuf[1024]; xps_resolve_url(tgtbuf, doc->base_uri, target, sizeof tgtbuf); - if (!strcmp(type, REL_START_PART)) + if (!strcmp(type, REL_START_PART) || !strcmp(type, REL_START_PART_OXPS)) doc->start_part = fz_strdup(doc->ctx, tgtbuf); - if (!strcmp(type, REL_DOC_STRUCTURE) && fixdoc) + if ((!strcmp(type, REL_DOC_STRUCTURE) || !strcmp(type, REL_DOC_STRUCTURE_OXPS)) && fixdoc) fixdoc->outline = fz_strdup(doc->ctx, tgtbuf); if (!fz_xml_att(item, "Id")) fz_warn(doc->ctx, "missing relationship id for %s", target); -- cgit v1.2.3