projects
/
yaz-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:
cf3cacb
)
MARC XML parse: insert fake leader if missing YAZ-664
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 17 Jun 2013 13:57:08 +0000
(15:57 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 17 Jun 2013 13:57:08 +0000
(15:57 +0200)
src/marc_read_xml.c
patch
|
blob
|
history
diff --git
a/src/marc_read_xml.c
b/src/marc_read_xml.c
index
d47bbab
..
97e99e5
100644
(file)
--- a/
src/marc_read_xml.c
+++ b/
src/marc_read_xml.c
@@
-185,18
+185,13
@@
static int yaz_marc_read_xml_leader(yaz_marc_t mt, const xmlNode **ptr_p,
for(; p; p = p->next)
if (p->type == XML_TEXT_NODE)
leader = (const char *) p->content;
- break;
- }
- else
- {
- yaz_marc_cprintf(
- mt, "Expected element 'leader', got '%.80s'", ptr->name);
}
+ break;
}
if (!leader)
{
- yaz_marc_cprintf(mt, "Missing element 'leader'");
- return -1;
+ yaz_marc_cprintf(mt, "Missing leader. Inserting fake leader");
+ leader = "00000nam a22000000a 4500";
}
if (strlen(leader) != 24)
{