diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-03 16:14:06 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-03 16:14:06 +0200 |
commit | 2c267e58e55cf0ee9fd99d8d402fdfc732c294cc (patch) | |
tree | b5b4a8a05b1b692f16c51d3aa9d311d9ef352c06 /xps | |
parent | 8975aec496710bb9e35a4a1cb635ee0d4eaa60cc (diff) | |
download | mupdf-2c267e58e55cf0ee9fd99d8d402fdfc732c294cc.tar.xz |
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".
Diffstat (limited to 'xps')
-rw-r--r-- | xps/xps_resource.c | 3 | ||||
-rw-r--r-- | xps/xps_xml.c | 4 |
2 files changed, 3 insertions, 4 deletions
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; }; |