/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2010 Index Data
+ * Copyright (C) 1995-2012 Index Data
* See the file LICENSE for details.
*/
#include <stdio.h>
#include <string.h>
-#include <ctype.h>
#include <yaz/marcdisp.h>
#include <yaz/wrbuf.h>
#include <yaz/yaz-util.h>
}
if (ptr_code->type == XML_TEXT_NODE)
{
- ctrl_data_len =
+ ctrl_data_len =
strlen((const char *)ptr_code->content);
}
else
/* note that indstr[0] is unused so we use indstr[1..] */
yaz_marc_add_datafield_xml(mt, ptr_tag,
indstr+1, strlen(indstr+1));
-
+
if (yaz_marc_read_xml_subfields(mt, ptr->children))
return -1;
}
{
int format = 0;
yaz_marc_reset(mt);
-
+
for(; ptr; ptr = ptr->next)
if (ptr->type == XML_ELEMENT_NODE)
{
}
else if (!strcmp((const char *) ptr->name, "r"))
{
- format = YAZ_MARC_TMARCXML;
+ format = YAZ_MARC_TURBOMARC;
break;
}
else
ptr = ptr->children;
if (yaz_marc_read_xml_leader(mt, &ptr))
return -1;
-
+
switch (format)
{
case YAZ_MARC_MARCXML:
return yaz_marc_read_xml_fields(mt, ptr->next);
- case YAZ_MARC_TMARCXML:
+ case YAZ_MARC_TURBOMARC:
return yaz_marc_read_turbo_xml_fields(mt, ptr->next);
}
return -1;