From 2c267e58e55cf0ee9fd99d8d402fdfc732c294cc Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 3 Apr 2011 16:14:06 +0200 Subject: xps: Fix some issues with the XML parser. The new XML parser doesn't strip namespace prefixes, so we need to look for "x:Key" rather than just "Key". Also increase the max tag name length to avoid truncating tag names like "LinearGradientBrush.GradientStops". --- xps/xps_resource.c | 3 +-- xps/xps_xml.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'xps') diff --git a/xps/xps_resource.c b/xps/xps_resource.c index 59dc3f9d..7cbfe91f 100644 --- a/xps/xps_resource.c +++ b/xps/xps_resource.c @@ -129,8 +129,7 @@ xps_parse_resource_dictionary(xps_context *ctx, xps_resource **dictp, char *base for (node = xml_down(root); node; node = xml_next(node)) { - /* Usually "x:Key"; we have already processed and stripped namespace */ - key = xml_att(node, "Key"); + key = xml_att(node, "x:Key"); if (key) { entry = fz_malloc(sizeof(xps_resource)); diff --git a/xps/xps_xml.c b/xps/xps_xml.c index 397b68ec..6373b6c6 100644 --- a/xps/xps_xml.c +++ b/xps/xps_xml.c @@ -3,14 +3,14 @@ struct attribute { - char name[32]; + char name[40]; char *value; struct attribute *next; }; struct element { - char name[32]; + char name[40]; struct attribute *atts; struct element *up, *down, *next; }; -- cgit v1.2.3