[libgxps] Support OpenXPS fixed representation schema
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgxps] Support OpenXPS fixed representation schema
- Date: Fri, 31 Mar 2017 07:14:01 +0000 (UTC)
commit 764ae1e1e22c3f1bb58543aa40fa80488ee49a47
Author: Jason Crain <jason inspiresomeone us>
Date: Thu Mar 30 15:41:45 2017 -0500
Support OpenXPS fixed representation schema
Windows 8 and later default to creating OpenXPS documents instead of
XPS. OpenXPS is a modification of XPS, which has been standardized as
ECMA-388. OpenXPS changes some schema names. This adds support for the
new OpenXPS fixed representation schema so libgxps will work on OXPS
documents.
https://bugzilla.gnome.org/show_bug.cgi?id=768117
libgxps/gxps-file.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libgxps/gxps-file.c b/libgxps/gxps-file.c
index bd57618..4754690 100644
--- a/libgxps/gxps-file.c
+++ b/libgxps/gxps-file.c
@@ -73,6 +73,7 @@ gxps_file_error_quark (void)
#define REL_METATADA_CORE_PROPS
"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"
#define REL_METATADA_THUMBNAIL
"http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail"
#define REL_FIXED_REPRESENTATION "http://schemas.microsoft.com/xps/2005/06/fixedrepresentation"
+#define REL_OXPS_FIXED_REPRESENTATION "http://schemas.openxps.org/oxps/v1.0/fixedrepresentation"
/* Relationship parser */
static void
@@ -110,7 +111,8 @@ rels_start_element (GMarkupParseContext *context,
return;
}
- if (strcmp (type, REL_FIXED_REPRESENTATION) == 0) {
+ if (strcmp (type, REL_FIXED_REPRESENTATION) == 0 ||
+ strcmp (type, REL_OXPS_FIXED_REPRESENTATION) == 0) {
xps->priv->fixed_repr = g_strdup (target);
} else if (strcmp (type, REL_METATADA_THUMBNAIL) == 0) {
xps->priv->thumbnail = g_strdup (target);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]