projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fdc303
)
Show attributes in xml_context function
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 21 May 2013 14:13:41 +0000
(16:13 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 21 May 2013 14:13:41 +0000
(16:13 +0200)
src/pazpar2_config.c
patch
|
blob
|
history
diff --git
a/src/pazpar2_config.c
b/src/pazpar2_config.c
index
698fb15
..
81f0e55
100644
(file)
--- a/
src/pazpar2_config.c
+++ b/
src/pazpar2_config.c
@@
-66,8
+66,19
@@
struct service_xslt
static char *xml_context(const xmlNode *ptr, char *res, size_t len)
{
+ xmlAttr *attr = ptr->properties;
size_t off = len - 1;
+
res[off] = '\0';
+ for (; attr; attr = attr->next)
+ {
+ size_t l = strlen((const char *) attr->name);
+ if (off <= l + 1)
+ break;
+ off = off - l;
+ memcpy(res + off, attr->name, l);
+ res[--off] = '@';
+ }
while (ptr && ptr->type == XML_ELEMENT_NODE)
{
size_t l = strlen((const char *) ptr->name);