From: Dennis Schafroth Date: Mon, 15 Mar 2010 14:11:46 +0000 (+0100) Subject: Merge branch 'turbomarc' X-Git-Tag: v4.0.3~33 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=01f73e12327022619d6ca45d6624abd8de947552;hp=0836f7a70cff4b7a8edc2c2a2fd1b3cb2c6588cc Merge branch 'turbomarc' --- diff --git a/.cproject b/.cproject index 80a5f3e..f42e265 100644 --- a/.cproject +++ b/.cproject @@ -2,220 +2,405 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/include/yaz/marcdisp.h b/include/yaz/marcdisp.h index 4d11922..2453ab0 100644 --- a/include/yaz/marcdisp.h +++ b/include/yaz/marcdisp.h @@ -69,6 +69,8 @@ YAZ_EXPORT void yaz_marc_xml(yaz_marc_t mt, int xmlmode); #define YAZ_MARC_XCHANGE 5 /** \brief Output format: check only (no marc output) */ #define YAZ_MARC_CHECK 6 +/** \brief Output format: Turbo MARCXML Index Data format*/ +#define YAZ_MARC_TMARCXML 7 /** \brief set iconv handle for character set conversion */ YAZ_EXPORT void yaz_marc_iconv(yaz_marc_t mt, yaz_iconv_t cd); diff --git a/src/marc_read_xml.c b/src/marc_read_xml.c index b755c2e..3f3e05b 100644 --- a/src/marc_read_xml.c +++ b/src/marc_read_xml.c @@ -90,6 +90,82 @@ int yaz_marc_read_xml_subfields(yaz_marc_t mt, const xmlNode *ptr) return 0; } +const char *tag_value_extract(const char *name, char tag_buffer[5]) { + size_t length = strlen(name); + if (length == 3) { + strcpy(tag_buffer, name); + return tag_buffer; + } + return 0; +} + +// Given a xmlNode ptr, extract a value from either a element name or from a given attribute +const char *element_attribute_value_extract(const xmlNode *ptr, const char *attribute_name, NMEM nmem) { + + const char *name = ptr->name; + size_t length = strlen(name); + if (length > 1 ) { + return nmem_strdup(nmem, name+1); + } + // TODO Extract from attribute where matches attribute_name + xmlAttr *attr; + for (attr = ptr->properties; attr; attr = attr->next) + if (!strcmp((const char *)attr->name, attribute_name)) { + return nmem_text_node_cdata(attr->children, nmem); + } + return 0; +} + + +int yaz_marc_read_turbo_xml_subfields(yaz_marc_t mt, const xmlNode *ptr) +{ + NMEM nmem = yaz_marc_get_nmem(mt); + for (; ptr; ptr = ptr->next) + { + if (ptr->type == XML_ELEMENT_NODE) + { + xmlNode *p; + if (!strncmp((const char *) ptr->name, "s", 1)) + { + NMEM nmem = yaz_marc_get_nmem(mt); + char *buffer = (char *) nmem_malloc(nmem, 5); + const char *tag_value = element_attribute_value_extract(ptr, "code", nmem); + if (!tag_value) + { + yaz_marc_cprintf( + mt, "Missing 'code' value for 'subfield'" ); + return -1; + } + + size_t ctrl_data_len = 0; + char *ctrl_data_buf = 0; + ctrl_data_len = strlen((const char *) tag_value); + // Extract (length) from CDATA + xmlNode *p; + for (p = ptr->children; p ; p = p->next) + if (p->type == XML_TEXT_NODE) + ctrl_data_len += strlen((const char *)p->content); + // Allocate memory for code value (1 character (can be multi-byte) and data + ctrl_data_buf = (char *) nmem_malloc(nmem, ctrl_data_len+1); + // Build a string with "" + strcpy(ctrl_data_buf, (const char *) tag_value); + for (p = ptr->children; p ; p = p->next) + if (p->type == XML_TEXT_NODE) + strcat(ctrl_data_buf, (const char *)p->content); + yaz_marc_add_subfield(mt, ctrl_data_buf, ctrl_data_len); + } + else + { + yaz_marc_cprintf( + mt, "Expected element 'subfield', got '%.80s'", ptr->name); + return -1; + } + } + } + return 0; +} + + static int yaz_marc_read_xml_leader(yaz_marc_t mt, const xmlNode **ptr_p) { int indicator_length; @@ -104,7 +180,8 @@ static int yaz_marc_read_xml_leader(yaz_marc_t mt, const xmlNode **ptr_p) for(; ptr; ptr = ptr->next) if (ptr->type == XML_ELEMENT_NODE) { - if (!strcmp((const char *) ptr->name, "leader")) + if ( !strcmp( (const char *) ptr->name, "leader") || + (!strncmp((const char *) ptr->name, "l", 1) )) { xmlNode *p = ptr->children; for(; p; p = p->next) @@ -145,7 +222,7 @@ static int yaz_marc_read_xml_fields(yaz_marc_t mt, const xmlNode *ptr) for(; ptr; ptr = ptr->next) if (ptr->type == XML_ELEMENT_NODE) { - if (!strcmp((const char *) ptr->name, "controlfield")) + if (!strcmp( (const char *) ptr->name, "controlfield")) { const xmlNode *ptr_tag = 0; struct _xmlAttr *attr; @@ -215,6 +292,75 @@ static int yaz_marc_read_xml_fields(yaz_marc_t mt, const xmlNode *ptr) } return 0; } + +void yaz_marc_add_datafield_turbo_xml(yaz_marc_t mt, char *tag_value, char *indicators); + +static int yaz_marc_read_turbo_xml_fields(yaz_marc_t mt, const xmlNode *ptr) +{ + for(; ptr; ptr = ptr->next) + if (ptr->type == XML_ELEMENT_NODE) + { + if (!strncmp( (const char *) ptr->name, "c", 1)) + { + NMEM nmem = yaz_marc_get_nmem(mt); + const char *tag_value = element_attribute_value_extract(ptr, "tag", nmem); + if (!tag_value) + { + yaz_marc_cprintf( + mt, "Missing attribute 'tag' for 'controlfield'" ); + return -1; + } + yaz_marc_add_controlfield_turbo_xml(mt, tag_value, ptr->children); + } + else if (!strncmp((const char *) ptr->name, "d",1)) + { + struct _xmlAttr *attr; + NMEM nmem = yaz_marc_get_nmem(mt); + char *indstr = nmem_malloc(nmem, 11); /* 0(unused), 1,....9, + zero term */ + int index = 0; + for (index = 0; index < 11; index++) + indstr[index] = '\0'; + const char *tag_value = element_attribute_value_extract(ptr, "tag", nmem); + if (!tag_value) + { + yaz_marc_cprintf( + mt, "Missing attribute 'tag' for 'datafield'" ); + return -1; + } + for (attr = ptr->properties; attr; attr = attr->next) + if (strlen((const char *)attr->name) == 2 && + attr->name[0] == 'i') + { + //extract indicator attribute from i#="Y" pattern + int no = atoi((const char *)attr->name+1); + if (attr->children + && attr->children->type == XML_TEXT_NODE) + indstr[no] = attr->children->content[0]; + } + else + { + yaz_marc_cprintf( + mt, "Bad attribute '%.80s' for 'datafield'", + attr->name); + } + /* note that indstr[0] is unused so we use indstr[1..] */ + yaz_marc_add_datafield_turbo_xml(mt, tag_value, indstr+1); + int rc = yaz_marc_read_turbo_xml_subfields(mt, ptr->children /*, indstr */); + if (rc) + return -1; + } + else + { + yaz_marc_cprintf(mt, + "Expected element controlfield or datafield," + " got %.80s", ptr->name); + return -1; + } + } + return 0; +} + + #endif #if YAZ_HAVE_XML2 @@ -225,9 +371,15 @@ int yaz_marc_read_xml(yaz_marc_t mt, const xmlNode *ptr) for(; ptr; ptr = ptr->next) if (ptr->type == XML_ELEMENT_NODE) { - if (!strcmp((const char *) ptr->name, "record")) + //TODO Should actually look at the namespace but... + if (!strcmp((const char *) ptr->name, "record")) { + yaz_marc_set_read_format(mt, YAZ_MARC_MARCXML); break; - else + } + else if (!strcmp((const char *) ptr->name, "r")) { + yaz_marc_set_read_format(mt, YAZ_MARC_TMARCXML); + break; + } { yaz_marc_cprintf( mt, "Unknown element '%.80s' in MARC XML reader", @@ -244,7 +396,14 @@ int yaz_marc_read_xml(yaz_marc_t mt, const xmlNode *ptr) ptr = ptr->children; if (yaz_marc_read_xml_leader(mt, &ptr)) return -1; - return yaz_marc_read_xml_fields(mt, ptr->next); + + switch (yaz_marc_get_read_format(mt)) { + case YAZ_MARC_MARCXML: + return yaz_marc_read_xml_fields(mt, ptr->next); + case YAZ_MARC_TMARCXML: + return yaz_marc_read_turbo_xml_fields(mt, ptr->next); + } + return -1; } #endif diff --git a/src/marcdisp.c b/src/marcdisp.c index 8f3ebc0..5cda038 100644 --- a/src/marcdisp.c +++ b/src/marcdisp.c @@ -87,7 +87,8 @@ struct yaz_marc_subfield { struct yaz_marc_t_ { WRBUF m_wr; NMEM nmem; - int xml; + int input_format; + int output_format; int debug; int write_using_libxml2; enum yaz_collection_state enable_collection; @@ -103,7 +104,7 @@ struct yaz_marc_t_ { yaz_marc_t yaz_marc_create(void) { yaz_marc_t mt = (yaz_marc_t) xmalloc(sizeof(*mt)); - mt->xml = YAZ_MARC_LINE; + mt->output_format = YAZ_MARC_LINE; mt->debug = 0; mt->write_using_libxml2 = 0; mt->enable_collection = no_collection; @@ -161,6 +162,16 @@ void yaz_marc_add_controlfield_xml(yaz_marc_t mt, const xmlNode *ptr_tag, n->u.controlfield.tag = nmem_text_node_cdata(ptr_tag, mt->nmem); n->u.controlfield.data = nmem_text_node_cdata(ptr_data, mt->nmem); } + +void yaz_marc_add_controlfield_turbo_xml(yaz_marc_t mt, char *tag, + const xmlNode *ptr_data) +{ + struct yaz_marc_node *n = yaz_marc_add_node(mt); + n->which = YAZ_MARC_CONTROLFIELD; + n->u.controlfield.tag = tag; + n->u.controlfield.data = nmem_text_node_cdata(ptr_data, mt->nmem); +} + #endif @@ -230,6 +241,36 @@ void yaz_marc_add_datafield(yaz_marc_t mt, const char *tag, mt->subfield_pp = &n->u.datafield.subfields; } +// Magic function: adds a attribute value to the element name if it is plain characters. +// if not, and if the attribute name is not null, it will append a attribute element with the value +// if attribute name is null it will return a non-zero value meaning it couldnt handle the value. + +int element_name_append_attribute_value(yaz_marc_t mt, WRBUF buffer, const char *attribute_name, char *code_data, size_t code_len) { + // TODO Map special codes to something possible for XML ELEMENT names + + int encode = 0; + int index = 0; + for (index = 0; index < code_len; index++) { + if (!((code_data[index] >= '0' && code_data[index] <= '9') || + (code_data[index] >= 'a' && code_data[index] <= 'z') || + (code_data[index] >= 'A' && code_data[index] <= 'Z'))) + encode = 1; + } + int success = 0; + // Add as attribute + if (encode && attribute_name) + wrbuf_printf(buffer, " %s=\"", attribute_name); + + if (!encode || attribute_name) + wrbuf_iconv_write_cdata(buffer, mt->iconv_cd, code_data, code_len); + else + success = -1; + + if (encode && attribute_name) + wrbuf_printf(buffer, "\""); // return error if we couldn't handle it. + return success; +} + #if YAZ_HAVE_XML2 void yaz_marc_add_datafield_xml(yaz_marc_t mt, const xmlNode *ptr_tag, const char *indicator, size_t indicator_len) @@ -244,6 +285,24 @@ void yaz_marc_add_datafield_xml(yaz_marc_t mt, const xmlNode *ptr_tag, /* make subfield_pp the current (last one) */ mt->subfield_pp = &n->u.datafield.subfields; } + +void yaz_marc_add_datafield_turbo_xml(yaz_marc_t mt, char *tag_value, char *indicators) +{ + struct yaz_marc_node *n = yaz_marc_add_node(mt); + n->which = YAZ_MARC_DATAFIELD; + n->u.datafield.tag = tag_value; + n->u.datafield.indicator = indicators; + n->u.datafield.subfields = 0; + + // make subfield_pp the current (last one) + mt->subfield_pp = &n->u.datafield.subfields; +} + +void yaz_marc_datafield_set_indicators(struct yaz_marc_node *n, char *indicator) +{ + n->u.datafield.indicator = indicator; +} + #endif void yaz_marc_add_subfield(yaz_marc_t mt, @@ -503,9 +562,10 @@ int yaz_marc_write_trailer(yaz_marc_t mt, WRBUF wr) { if (mt->enable_collection == collection_second) { - switch(mt->xml) + switch(mt->output_format) { case YAZ_MARC_MARCXML: + case YAZ_MARC_TMARCXML: wrbuf_printf(wr, "\n"); break; case YAZ_MARC_XCHANGE: @@ -523,11 +583,12 @@ void yaz_marc_enable_collection(yaz_marc_t mt) int yaz_marc_write_mode(yaz_marc_t mt, WRBUF wr) { - switch(mt->xml) + switch(mt->output_format) { case YAZ_MARC_LINE: return yaz_marc_write_line(mt, wr); case YAZ_MARC_MARCXML: + case YAZ_MARC_TMARCXML: return yaz_marc_write_marcxml(mt, wr); case YAZ_MARC_XCHANGE: return yaz_marc_write_marcxchange(mt, wr, 0, 0); /* no format, type */ @@ -539,6 +600,15 @@ int yaz_marc_write_mode(yaz_marc_t mt, WRBUF wr) return -1; } +const char *collection_name[2] = { "collection", "collection"}; +const char *record_name[2] = { "record", "r"}; +const char *leader_name[2] = { "leader", "l"}; +const char *controlfield_name[2]= { "controlfield", "c"}; +const char *datafield_name[2] = { "datafield", "d"}; +const char *indicator_name[2] = { "ind", "i"}; +const char *subfield_name[2] = { "subfield", "s"}; + + /** \brief common MARC XML/Xchange writer \param mt handle \param wr WRBUF output @@ -555,6 +625,145 @@ static int yaz_marc_write_marcxml_ns1(yaz_marc_t mt, WRBUF wr, int identifier_length; const char *leader = 0; + int turbo = yaz_marc_get_write_format(mt) == YAZ_MARC_TMARCXML; + + for (n = mt->nodes; n; n = n->next) + if (n->which == YAZ_MARC_LEADER) + { + leader = n->u.leader; + break; + } + + if (!leader) + return -1; + if (!atoi_n_check(leader+11, 1, &identifier_length)) + return -1; + + if (mt->enable_collection != no_collection) + { + if (mt->enable_collection == collection_first) { + wrbuf_printf(wr, "<%s xmlns=\"%s\">\n", collection_name[turbo], ns); + mt->enable_collection = collection_second; + } + wrbuf_printf(wr, "<%s", record_name[turbo]); + } + else + { + wrbuf_printf(wr, "<%s xmlns=\"%s\"", record_name[turbo], ns); + } + if (format) + wrbuf_printf(wr, " format=\"%.80s\"", format); + if (type) + wrbuf_printf(wr, " type=\"%.80s\"", type); + wrbuf_printf(wr, ">\n"); + for (n = mt->nodes; n; n = n->next) + { + struct yaz_marc_subfield *s; + + switch(n->which) + { + case YAZ_MARC_DATAFIELD: + + wrbuf_printf(wr, " <%s", datafield_name[turbo]); + if (!turbo) + wrbuf_printf(wr, " tag=\""); + wrbuf_iconv_write_cdata(wr, mt->iconv_cd, n->u.datafield.tag, + strlen(n->u.datafield.tag)); + if (!turbo) + wrbuf_printf(wr, "\""); + if (n->u.datafield.indicator) + { + int i; + for (i = 0; n->u.datafield.indicator[i]; i++) + { + wrbuf_printf(wr, " %s%d=\"", indicator_name[turbo], i+1); + wrbuf_iconv_write_cdata(wr, mt->iconv_cd, + n->u.datafield.indicator+i, 1); + wrbuf_iconv_puts(wr, mt->iconv_cd, "\""); + } + } + wrbuf_printf(wr, ">\n"); + for (s = n->u.datafield.subfields; s; s = s->next) + { + size_t using_code_len = get_subfield_len(mt, s->code_data, + identifier_length); + wrbuf_printf(wr, " <%s", subfield_name[turbo]); + if (!turbo) { + wrbuf_printf(wr, " code=\""); + wrbuf_iconv_write_cdata(wr, mt->iconv_cd, + s->code_data, using_code_len); + wrbuf_iconv_puts(wr, mt->iconv_cd, "\">"); + } else { + element_name_append_attribute_value(mt, wr, "code", s->code_data, using_code_len); + wrbuf_puts(wr, ">"); + } + wrbuf_iconv_write_cdata(wr, mt->iconv_cd, + s->code_data + using_code_len, + strlen(s->code_data + using_code_len)); + marc_iconv_reset(mt, wr); + wrbuf_printf(wr, "code_data, using_code_len); + wrbuf_puts(wr, ">\n"); + } + wrbuf_printf(wr, " iconv_cd, n->u.datafield.tag, + strlen(n->u.datafield.tag)); + wrbuf_printf(wr, ">\n", datafield_name[turbo]); + break; + case YAZ_MARC_CONTROLFIELD: + wrbuf_printf(wr, " <%s", controlfield_name[turbo]); + if (!turbo) { + wrbuf_printf(wr, " tag=\""); + wrbuf_iconv_write_cdata(wr, mt->iconv_cd, n->u.controlfield.tag, + strlen(n->u.controlfield.tag)); + wrbuf_iconv_puts(wr, mt->iconv_cd, "\">"); + } + else { + //TODO convert special + wrbuf_iconv_write_cdata(wr, mt->iconv_cd, n->u.controlfield.tag, + strlen(n->u.controlfield.tag)); + wrbuf_iconv_puts(wr, mt->iconv_cd, ">"); + } + wrbuf_iconv_write_cdata(wr, mt->iconv_cd, + n->u.controlfield.data, + strlen(n->u.controlfield.data)); + marc_iconv_reset(mt, wr); + wrbuf_printf(wr, "iconv_cd, n->u.controlfield.tag, + strlen(n->u.controlfield.tag)); + wrbuf_puts(wr, ">\n"); + break; + case YAZ_MARC_COMMENT: + wrbuf_printf(wr, "\n"); + break; + case YAZ_MARC_LEADER: + wrbuf_printf(wr, " <%s>", leader_name[turbo]); + wrbuf_iconv_write_cdata(wr, + 0 , /* no charset conversion for leader */ + n->u.leader, strlen(n->u.leader)); + wrbuf_printf(wr, "\n", leader_name[turbo]); + } + } + wrbuf_printf(wr, "\n", record_name[turbo]); + return 0; +} + +static int yaz_marc_write_marcxml_ns2(yaz_marc_t mt, WRBUF wr, + const char *ns, + const char *format, + const char *type) +{ + struct yaz_marc_node *n; + int identifier_length; + const char *leader = 0; + for (n = mt->nodes; n; n = n->next) if (n->which == YAZ_MARC_LEADER) { @@ -653,6 +862,7 @@ static int yaz_marc_write_marcxml_ns1(yaz_marc_t mt, WRBUF wr, return 0; } + static int yaz_marc_write_marcxml_ns(yaz_marc_t mt, WRBUF wr, const char *ns, const char *format, @@ -664,7 +874,10 @@ static int yaz_marc_write_marcxml_ns(yaz_marc_t mt, WRBUF wr, int ret; xmlNode *root_ptr; - ret = yaz_marc_write_xml(mt, &root_ptr, ns, format, type); + if (yaz_marc_get_write_format(mt) == YAZ_MARC_MARCXML) + ret = yaz_marc_write_xml(mt, &root_ptr, ns, format, type); + else // Check for Turbo XML + ret = yaz_marc_write_turbo_xml(mt, &root_ptr, ns, format, type); if (ret == 0) { xmlChar *buf_out; @@ -694,7 +907,10 @@ int yaz_marc_write_marcxml(yaz_marc_t mt, WRBUF wr) /* http://www.loc.gov/marc/bibliographic/ecbdldrd.html#mrcblea */ if (!mt->leader_spec) yaz_marc_modify_leader(mt, 9, "a"); - return yaz_marc_write_marcxml_ns(mt, wr, "http://www.loc.gov/MARC21/slim", + char *name_space = "http://www.loc.gov/MARC21/slim"; + if (mt->output_format == YAZ_MARC_TMARCXML) + name_space = "http://www.indexdata.com/MARC21/turboxml"; + return yaz_marc_write_marcxml_ns(mt, wr, name_space, 0, 0); } @@ -707,8 +923,166 @@ int yaz_marc_write_marcxchange(yaz_marc_t mt, WRBUF wr, 0, 0); } - #if YAZ_HAVE_XML2 + +void add_marc_datafield_turbo_xml(yaz_marc_t mt, struct yaz_marc_node *n, xmlNode *record_ptr, xmlNsPtr ns_record, WRBUF wr_cdata, int identifier_length) +{ + xmlNode *ptr; + struct yaz_marc_subfield *s; + int turbo = mt->output_format == YAZ_MARC_TMARCXML; + if (!turbo) { + ptr = xmlNewChild(record_ptr, ns_record, BAD_CAST "datafield", 0); + xmlNewProp(ptr, BAD_CAST "tag", BAD_CAST n->u.datafield.tag); + } + else { + //TODO consider if safe + char field[10]; + field[0] = 'd'; + strncpy(field + 1, n->u.datafield.tag, 3); + field[4] = '\0'; + ptr = xmlNewChild(record_ptr, ns_record, BAD_CAST field, 0); + } + if (n->u.datafield.indicator) + { + int i; + for (i = 0; n->u.datafield.indicator[i]; i++) + { + char ind_str[6]; + char ind_val[2]; + + ind_val[0] = n->u.datafield.indicator[i]; + ind_val[1] = '\0'; + sprintf(ind_str, "%s%d", indicator_name[turbo], i+1); + xmlNewProp(ptr, BAD_CAST ind_str, BAD_CAST ind_val); + } + } + WRBUF subfield_name = wrbuf_alloc(); + for (s = n->u.datafield.subfields; s; s = s->next) + { + xmlNode *ptr_subfield; + size_t using_code_len = get_subfield_len(mt, s->code_data, + identifier_length); + wrbuf_rewind(wr_cdata); + wrbuf_iconv_puts(wr_cdata, mt->iconv_cd, s->code_data + using_code_len); + marc_iconv_reset(mt, wr_cdata); + + if (!turbo) { + ptr_subfield = xmlNewTextChild( + ptr, ns_record, + BAD_CAST "subfield", BAD_CAST wrbuf_cstr(wr_cdata)); + // Generate code attribute value and add + wrbuf_rewind(wr_cdata); + wrbuf_iconv_write(wr_cdata, mt->iconv_cd,s->code_data, using_code_len); + xmlNewProp(ptr_subfield, BAD_CAST "code", + BAD_CAST wrbuf_cstr(wr_cdata)); + } + else { // Turbo format + wrbuf_rewind(subfield_name); + wrbuf_puts(subfield_name, "s"); + int not_written = element_name_append_attribute_value(mt, subfield_name, 0, s->code_data, using_code_len) != 0; + ptr_subfield = xmlNewTextChild(ptr, ns_record, + BAD_CAST wrbuf_cstr(subfield_name), + BAD_CAST wrbuf_cstr(wr_cdata)); + if (not_written) { + // Generate code attribute value and add + wrbuf_rewind(wr_cdata); + wrbuf_iconv_write(wr_cdata, mt->iconv_cd,s->code_data, using_code_len); + xmlNewProp(ptr_subfield, BAD_CAST "code", BAD_CAST wrbuf_cstr(wr_cdata)); + } + } + } + wrbuf_destroy(subfield_name); +} + +int yaz_marc_write_turbo_xml(yaz_marc_t mt, xmlNode **root_ptr, + const char *ns, + const char *format, + const char *type) +{ + struct yaz_marc_node *n; + int identifier_length; + const char *leader = 0; + xmlNode *record_ptr; + xmlNsPtr ns_record; + WRBUF wr_cdata = 0; + int turbo = mt->output_format == YAZ_MARC_TMARCXML; + for (n = mt->nodes; n; n = n->next) + if (n->which == YAZ_MARC_LEADER) + { + leader = n->u.leader; + break; + } + + if (!leader) + return -1; + if (!atoi_n_check(leader+11, 1, &identifier_length)) + return -1; + + wr_cdata = wrbuf_alloc(); + + record_ptr = xmlNewNode(0, BAD_CAST "r"); + *root_ptr = record_ptr; + + ns_record = xmlNewNs(record_ptr, BAD_CAST ns, 0); + xmlSetNs(record_ptr, ns_record); + + if (format) + xmlNewProp(record_ptr, BAD_CAST "format", BAD_CAST format); + if (type) + xmlNewProp(record_ptr, BAD_CAST "type", BAD_CAST type); + for (n = mt->nodes; n; n = n->next) + { + struct yaz_marc_subfield *s; + xmlNode *ptr; + + switch(n->which) + { + case YAZ_MARC_DATAFIELD: + add_marc_datafield_turbo_xml(mt, n, record_ptr, ns_record, wr_cdata, identifier_length); + break; + case YAZ_MARC_CONTROLFIELD: + wrbuf_rewind(wr_cdata); + wrbuf_iconv_puts(wr_cdata, mt->iconv_cd, n->u.controlfield.data); + marc_iconv_reset(mt, wr_cdata); + + if (!turbo) { + ptr = xmlNewTextChild(record_ptr, ns_record, + BAD_CAST "controlfield", + BAD_CAST wrbuf_cstr(wr_cdata)); + xmlNewProp(ptr, BAD_CAST "tag", BAD_CAST n->u.controlfield.tag); + } + else { + // TODO required iconv? + char field[10]; + field[0] = 'c'; + strncpy(field + 1, n->u.controlfield.tag, 3); + field[4] = '\0'; + ptr = xmlNewTextChild(record_ptr, ns_record, + BAD_CAST field, + BAD_CAST wrbuf_cstr(wr_cdata)); + } + + break; + case YAZ_MARC_COMMENT: + ptr = xmlNewComment(BAD_CAST n->u.comment); + xmlAddChild(record_ptr, ptr); + break; + case YAZ_MARC_LEADER: + { + char *field = "leader"; + if (turbo) + field = "l"; + xmlNewTextChild(record_ptr, ns_record, BAD_CAST field, + BAD_CAST n->u.leader); + } + break; + } + } + wrbuf_destroy(wr_cdata); + return 0; +} + + int yaz_marc_write_xml(yaz_marc_t mt, xmlNode **root_ptr, const char *ns, const char *format, @@ -779,7 +1153,7 @@ int yaz_marc_write_xml(yaz_marc_t mt, xmlNode **root_ptr, s->code_data + using_code_len); marc_iconv_reset(mt, wr_cdata); ptr_subfield = xmlNewTextChild( - ptr, ns_record, + ptr, ns_record, BAD_CAST "subfield", BAD_CAST wrbuf_cstr(wr_cdata)); wrbuf_rewind(wr_cdata); @@ -813,6 +1187,10 @@ int yaz_marc_write_xml(yaz_marc_t mt, xmlNode **root_ptr, wrbuf_destroy(wr_cdata); return 0; } + + + + #endif int yaz_marc_write_iso2709(yaz_marc_t mt, WRBUF wr) @@ -974,12 +1352,45 @@ int yaz_marc_decode_buf (yaz_marc_t mt, const char *buf, int bsize, return r; } -void yaz_marc_xml(yaz_marc_t mt, int xmlmode) +void yaz_marc_set_read_format(yaz_marc_t mt, int format) { if (mt) - mt->xml = xmlmode; + mt->input_format = format; } +int yaz_marc_get_read_format(yaz_marc_t mt) +{ + if (mt) + return mt->input_format; + return -1; +} + + +void yaz_marc_set_write_format(yaz_marc_t mt, int format) +{ + if (mt) { + mt->output_format = format; + } +} + +int yaz_marc_get_write_format(yaz_marc_t mt) +{ + if (mt) + return mt->output_format; + return -1; +} + + +/** + * Deprecated, use yaz_marc_set_write_format + */ +void yaz_marc_xml(yaz_marc_t mt, int xmlmode) +{ + yaz_marc_set_write_format(mt, xmlmode); +} + + + void yaz_marc_debug(yaz_marc_t mt, int level) { if (mt) @@ -1073,6 +1484,8 @@ int yaz_marc_decode_formatstr(const char *arg) mode = YAZ_MARC_ISO2709; if (!strcmp(arg, "marcxml")) mode = YAZ_MARC_MARCXML; + if (!strcmp(arg, "tmarcxml")) + mode = YAZ_MARC_TMARCXML; if (!strcmp(arg, "marcxchange")) mode = YAZ_MARC_XCHANGE; if (!strcmp(arg, "line")) @@ -1085,6 +1498,12 @@ void yaz_marc_write_using_libxml2(yaz_marc_t mt, int enable) mt->write_using_libxml2 = enable; } +int yaz_marc_is_turbo_format(yaz_marc_t mt) +{ + return mt->output_format == YAZ_MARC_TMARCXML; +} + + /* * Local variables: * c-basic-offset: 4 diff --git a/src/record_conv.c b/src/record_conv.c index 6f65797..b3ec821 100644 --- a/src/record_conv.c +++ b/src/record_conv.c @@ -304,6 +304,12 @@ static int conv_marc(yaz_record_conv_t p, const xmlNode *ptr) if (input_charset && !output_charset) output_charset = "utf-8"; } + else if (!strcmp(output_format, "tmarcxml")) + { + output_format_mode = YAZ_MARC_TMARCXML; + if (input_charset && !output_charset) + output_charset = "utf-8"; + } else if (!strcmp(output_format, "marc")) { output_format_mode = YAZ_MARC_ISO2709; @@ -472,7 +478,8 @@ static int yaz_record_conv_record_rule(yaz_record_conv_t p, else ret = -1; } - else if (r->u.marc.input_format == YAZ_MARC_MARCXML) + else if (r->u.marc.input_format == YAZ_MARC_MARCXML || + r->u.marc.input_format == YAZ_MARC_TMARCXML) { xmlDocPtr doc = xmlParseMemory(wrbuf_buf(record), wrbuf_len(record)); @@ -483,7 +490,7 @@ static int yaz_record_conv_record_rule(yaz_record_conv_t p, } else { - ret = yaz_marc_read_xml(mt, xmlDocGetRootElement(doc)); + ret = yaz_marc_read_xml(mt, xmlDocGetRootElement(doc)); if (ret) wrbuf_printf(p->wr_error, "yaz_marc_read_xml failed"); } diff --git a/src/zoom-c.c b/src/zoom-c.c index 4a208b3..44a5646 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2196,6 +2196,11 @@ ZOOM_API(const char *) return get_record_format(rec, len, npr, YAZ_MARC_MARCXML, charset, format); } + else if (!strcmp(type, "txml")) + { + return get_record_format(rec, len, npr, YAZ_MARC_TMARCXML, charset, + format); + } else if (!strcmp(type, "raw")) { return get_record_format(rec, len, npr, YAZ_MARC_ISO2709, charset, diff --git a/test/.gitignore b/test/.gitignore index ad09bef..6c57ec2 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -36,3 +36,6 @@ test_log_thread *.log *.o *~ +*.diff +*.hex* +*.revert* \ No newline at end of file diff --git a/test/test_record_conv.c b/test/test_record_conv.c index dff7f68..80b6d02 100644 --- a/test/test_record_conv.c +++ b/test/test_record_conv.c @@ -225,6 +225,14 @@ static void tst_convert1(void) " 11224466 \n" " \n" "\n"; + const char *tmarcxml_rec = + "\n" + " 00080nam a22000498a 4500\n" + " 11224466 \n" + " \n" + " 11224466 \n" + " \n" + "\n"; const char *iso2709_rec = "\x30\x30\x30\x38\x30\x6E\x61\x6D\x20\x61\x32\x32\x30\x30\x30\x34" "\x39\x38\x61\x20\x34\x35\x30\x30\x30\x30\x31\x30\x30\x31\x33\x30" @@ -242,6 +250,7 @@ static void tst_convert1(void) "", 0, &p)); YAZ_CHECK(conv_convert_test(p, marcxml_rec, iso2709_rec)); + YAZ_CHECK(conv_convert_test(p, tmarcxml_rec, iso2709_rec)); yaz_record_conv_destroy(p); YAZ_CHECK(conv_configure_test("" diff --git a/test/tmarc1.xml b/test/tmarc1.xml new file mode 100644 index 0000000..6483662 --- /dev/null +++ b/test/tmarc1.xml @@ -0,0 +1,95 @@ + + + + 00988nam0a32003011 450 + + 9 181 423 4 + 710100 + a + + + n + e + + + m + u + 2002 + us + eng + 0 + + + a + xx + + + 1-4000-4596-7 + $14,00 + + + DBC200439 + + + + Sloman + Larry + + + On the road with Bob Dylan + Larry "Ratso" Sloman + + + Revised edition + Three Rivers Press + + + New York + Three Rivers Press + 2002 + + + xv, 464 sider, tavler + + + Larry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue" + + + PÃ¥ omslaget: With a new introduction by Kinky Friedman + + + Tidligere: 1. udgave. New York, Bantam, 1978 + + + + 99.4 + Dylan + Bob + + + 78.9064 + 5 + + + folkemusik + + + folkemusikere + + + rockmusik + + + rockmusikere + + + rockkoncerter + + + USA + + + 1970-1979 + + + diff --git a/test/tmarc1.xml.marc b/test/tmarc1.xml.marc new file mode 100644 index 0000000..efc7bdf --- /dev/null +++ b/test/tmarc1.xml.marc @@ -0,0 +1 @@ +00989nam0a32003011 450 001002800000004001000028008002800038009001100066021002700077032001500104100002100119245005400140250004100194260004000235300002700275504012300302512006100425520005000486652002400536652001600560666001600576666001900592666001500611666001800626666001900644666000900663666001500672000a9 181 423 4b710100fa000rnae000tmuua2002buslengv0000aagxx000a1-4000-4596-7d$14,00000&DBC2004390000aSlomanhLarry000aOn the road with Bob DylaneLarry "Ratso" Sloman000aRevised editionbThree Rivers Press000aNew YorkbThree Rivers Pressc2002000axv, 464 sider, tavler000aLarry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue"000aPÃ¥ omslaget: With a new introduction by Kinky Friedman000aTidligere: 1. udgave. New York, Bantam, 19780000m99.4aDylanhBob000p78.9064v5000ffolkemusik000ffolkemusikere000frockmusik000frockmusikere000frockkoncerter000eUSA000i1970-1979 \ No newline at end of file diff --git a/test/tmarc2.xml b/test/tmarc2.xml new file mode 100644 index 0000000..f2b6433 --- /dev/null +++ b/test/tmarc2.xml @@ -0,0 +1,102 @@ + + + + 01116nam0a32002171 450 + + 9 182 502 3 + 710100 + a + + + c + e + + + s + f + 1995 + gb + eng + 0 + + + s + xc + + + bef + + + Mimms + Garnet + + + Cry baby + Warm and soulful + Garnet Mimms ... [et al.] + + + Bury St. Edmunds + BGO + 1995 + + + 1 cd + + + Indspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful) + + + Indhold: + + + BGO + BGOCD268 + + + 78.794 + 4 + + + soul + rhythm & blues + vokal + 1960-1969 + USA + + + 11 + Cry baby + Nobody but you + Until you were gone + Anytime you want me + So close + For your precious love + Baby don't you weep + A ¤quiet place + Cry to me + Don't change your heart + Wanting you + The ¤truth hurts + I'll take good care of you + Looking for you + It won't hurt (half as much) + It was easier to hurt her + Thinkin' + Prove it to me + More than a miracle + As long as I have you + One girl + There goes my baby + It's just a matter of time + A ¤little bit of soap + Look away + I'll make it up to you + + + 40 + 0 + 1 girl + + + diff --git a/test/tmarc2.xml.marc b/test/tmarc2.xml.marc new file mode 100644 index 0000000..106fce3 --- /dev/null +++ b/test/tmarc2.xml.marc @@ -0,0 +1 @@ +01121nam0a32002171 450 001002800000004001000028008002800038009001100066039000900077100001900086245005900105260003300164300001000197512007300207531001400280538001900294652001500313666004900328795050600377795002000883000a9 182 502 3b710100fa000rcae000tsufa1995bgblengv0000asgxc000abef000aMimmshGarnet000aCry babyaWarm and soulfuleGarnet Mimms ... [et al.]000aBury St. EdmundsbBGOc1995000n1 cd000aIndspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful)000aIndhold:000fBGOgBGOCD268000m78.794v4000msoulmrhythm & bluesnvokalp1960-1969lUSA000Ã¥11aCry babyaNobody but youaUntil you were goneaAnytime you want meaSo closeaFor your precious loveaBaby don't you weepaA ¤quiet placeaCry to meaDon't change your heartaWanting youaThe ¤truth hurtsaI'll take good care of youaLooking for youaIt won't hurt (half as much)aIt was easier to hurt heraThinkin'aProve it to meaMore than a miracleaAs long as I have youaOne girlaThere goes my babyaIt's just a matter of timeaA ¤little bit of soapaLook awayaI'll make it up to you000Ã¥40y0a1 girl \ No newline at end of file diff --git a/test/tmarc3.xml b/test/tmarc3.xml new file mode 100644 index 0000000..3fac6ac --- /dev/null +++ b/test/tmarc3.xml @@ -0,0 +1,122 @@ + + + + 00914naa a2200337 450 + + a00001508 + a + + + i + n + + + 1991 + xx + nor + a + 9 + + + a + xx + + + nor + + + eng + + + 06 + + + Byfornyelse ved Ibsen-Ringen + + + farvefoto + plan + snit + + + Byggekunst + 1991 + 1/2 + 41-45 + + + byfornyelse + + + sanering + + + Norge + + + Oslo + + + Telje Torp Aasen Arkitektkontor + Kristian Augustsgate 7B + + + Eng, Dagfin + + + anlund, Tom + Kristian Augustsgate + Pilestredet 19 + + + a + + + + + + ITM + ARK50 + 0000145 + 1991 + 1/2 + 41-45 + + + + + 20020111 + ARK01 + 2002 + + + + + 20020111 + ARK01 + 2116 + + + + + 20021002 + ARK01 + 1000 + + + ICLLOAD + 00 + 20021122 + ARK01 + 1948 + + + 20030618 + ARK01 + 1330 + + + a00001508 + + + diff --git a/test/tmarc3.xml.marc b/test/tmarc3.xml.marc new file mode 100644 index 0000000..64f2cef --- /dev/null +++ b/test/tmarc3.xml.marc @@ -0,0 +1 @@ +00914naa a2200337 450 001001700000004000900017008002400026009001000050041000800060041000800068097000700076245003300083300002600116557003300142630001600175630001300191633001000204633000900214648006100223648001600284648005400300J01000600354BAS000500360LKR004200365CAT003000407CAT003000437CAT003000467CAT003900497CAT002600536UID001400562 aa00001508fa airn a1991bxxlnortav9 aagxx anor deng00a06 aByfornyelse ved Ibsen-Ringen bfarvefotobplanbsnit aByggekunstj1991v1/2k41-45 fbyfornyelse fsanering fNorge fOslo aTelje Torp Aasen ArkitektkontorcKristian Augustsgate 7B aEng, Dagfin ranlund, TomcKristian AugustsgatecPilestredet 19 aa 0 aITMlARK50b0000145y1991i1/2k41-45 abc20020111lARK01h2002 abc20020111lARK01h2116 abc20021002lARK01h1000 aICLLOADb00c20021122lARK01h1948 c20030618lARK01h1330 aa00001508 \ No newline at end of file diff --git a/test/tmarc4.xml b/test/tmarc4.xml new file mode 100644 index 0000000..763d438 --- /dev/null +++ b/test/tmarc4.xml @@ -0,0 +1,11 @@ + + + + + + + 009140091a22a 22003370 + + + + diff --git a/test/tmarc4.xml.marc b/test/tmarc4.xml.marc new file mode 100644 index 0000000..9b3d907 --- /dev/null +++ b/test/tmarc4.xml.marc @@ -0,0 +1 @@ +000260091a2200025003370  \ No newline at end of file diff --git a/test/tmarc5.xml b/test/tmarc5.xml new file mode 100644 index 0000000..7adf9fb --- /dev/null +++ b/test/tmarc5.xml @@ -0,0 +1,33 @@ + + + 00492nam a22001455a 4500 + 000277485 + 20051026111436.0 + 050413s1894 gr 000 0 gre d + + Μαρούδης, Κωνσταντίνος Ιω + + + Ελληνικόν κρυπτογραφικόν λεξικόν / + Κωνστ. Ι. Μαρούδης. + + + εκδ. + + + Αθήνα, + 1894. + + + 248 σελ. + + + Greek language, Modern + Dialects + Dictionaries + + + Cryptography. + + + diff --git a/test/tmarc5.xml.marc b/test/tmarc5.xml.marc new file mode 100644 index 0000000..50102a7 --- /dev/null +++ b/test/tmarc5.xml.marc @@ -0,0 +1 @@ +00492nam a22001455a 450000100100000000500170001000800410002710000520006824501040012025000140022426000230023830000160026165000510027765000180032800027748520051026111436.0050413s1894 gr 000 0 gre d1 aΜαρούδης, Κωνσταντίνος Ιω10aΕλληνικόν κρυπτογραφικόν λεξικόν /cΚωνστ. Ι. Μαρούδης. η εκδ. aΑθήνα,c1894. a248 σελ. 0aGreek language, ModernxDialectsvDictionaries 0aCryptography. \ No newline at end of file diff --git a/test/tmarc6.xml b/test/tmarc6.xml new file mode 100644 index 0000000..6d45255 --- /dev/null +++ b/test/tmarc6.xml @@ -0,0 +1,34 @@ + + + 00366nam a22001698a 4500 + 11224466 + DLC + 00000000000000.0 + 910710c19910701nju 00010 eng + + 11224466 + + + DLC + DLC + + + 123-xyz + + + Jack Collins + + + How to program a computer + + + Penguin + + + 8710 + + + p. cm. + + + diff --git a/test/tmarc6.xml.marc b/test/tmarc6.xml.marc new file mode 100644 index 0000000..400a01a --- /dev/null +++ b/test/tmarc6.xml.marc @@ -0,0 +1 @@ +00366nam a22001698a 4500001001300000003000400013005001700017008004100034010001700075040001300092050001200105100001700117245003000134260001200164263000900176300001100185 11224466 DLC00000000000000.0910710c19910701nju 00010 eng  a 11224466  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. \ No newline at end of file diff --git a/test/tmarc7.xml b/test/tmarc7.xml new file mode 100644 index 0000000..7b80870 --- /dev/null +++ b/test/tmarc7.xml @@ -0,0 +1,88 @@ + + + 03114cam a2200349 i 4500 + 77123332 + DLC + 20051218154744.0 + 981008b2001 ilu 000 0 eng + + 57779 + + + 90490 + + + 93202 + + + DLC + DLC + + + 0 + und + orignew + u + ncip + 19 + y-gencatlg + + + 77123332 + + + Voyager Diacritic test -- New input 001 (SBIE). + + + ny : + ny, + 2001. + + + 100 p. ; + 12 cm. + + + New copy imported from file (8/12/99). + + + VOYAGER COLUMN 0 (NEW): Degree sign (°); Phono Copyright mark (℗); Copyright mark (©); Sharp (♯); Inverted Question mark (¿); Inverted Exclamation mark (¡). + + + VOYAGER COLUMN 1: Script L (ℓ); Polish L (Ł); Scandanavian O (Ø); D with Crossbar (Đ); Icelandic Thorn (Þ); AE Digraph (Æ); OE Digraph (Œ); Miagkii Znak (ʹ); Dot at Midline (·). + + + VOYAGER COLUMN 2: Musical Flat (♭); Patent Mark (®); Plus or Minus (±); O Hook (Æ ); U Hook (Ư); Alif (ʼ); alpha α; Ayn (Ê»); Polish l (ł). + + + VOYAGER COLUMN 3: Scandanavian o (ø); d with crossbar (đ); Icelandic Thorn (þ); ae Digraph (æ); oe Digraph (œ); Tverdii Znak (ʺ); Turkish i (ı); British Pound (£); eth (ð). + + + VOYAGER COLUMN 4: Dagger (DO NOT USE); o Hook (Æ¡); u Hook (Æ°); Beta β; Gamma γ; Superscript 0 (⁰); Superscript 1 (¹); Superscript 2 (²); Superscript 3 (³). + + + VOYAGER COLUMN 5: Superscript 4 (⁴); Superscript 5 (⁵); Superscript 6 (⁶); Superscript 7 (⁷); Superscript 8 (⁸); Superscript 9 (⁹); Superscript + (⁺); Superscript - (⁻); Superscript ( (⁽). + + + VOYAGER COLUMN 6: Superscript ) (⁾); Subscript 0 (₀); Subscript 1 (₁); Subscript 2 (₂); Subscript 3 (₃); Subscript 4 (₄); Subscript 5 (₅); Subscript 6 (₆); Subscript 7 (₇). + + + VOYAGER COLUMN 7: Subscript 8 (₈); Subscript 9 (₉); Subscript + (₊); Subscript - (₋); Subscript ( (₍); Subscript ) (₎); Pseudo Question Mark (ỏ); Grave (ò); Acute (ó). + + + VOYAGER COLUMN 8: Circumflex (ô); Tilde (õ); Macron (ō); Breve (ŏ); Superior Dot (ȯ); Umlaut (ö); Hacek (ǒ); Circle Above (o̊); Ligature left (oÍ¡). + + + VOYAGER COLUMN 9: Ligature right (o) ; High Comma off center (o̕); Double Acute (ő); Candrabindu (o̐); Cedilla (o̧); Right Hook (ǫ); Dot Below (oÌ£); Double Dot Below (o̤); Circle Below (oÌ¥). + + + VOYAGER COLUMN 10: Double Underscore (o̳); Underscore (o̲); Left Hook (o̦); Right Cedilla (o̜); Upadhmaniya (oÌ®); Double Tilde 1st half (oÍ ); Double Tilde 2nd half (o) ; High Comma centered (o̓). + + + VOYAGER PC Keyboard: Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~). + + + Standard PC Keyboard: 1234567890-= !@#$%^&*()_+ qwertyuiop[]\ QWERTYUIOP{}| asdfghjkl;' ASDFGHJKL:" zxcvbnm,./ ZXCVBNM<>? + + + diff --git a/test/tmarc7.xml.marc b/test/tmarc7.xml.marc new file mode 100644 index 0000000..e6315df --- /dev/null +++ b/test/tmarc7.xml.marc @@ -0,0 +1 @@ +03109cam a2200349 i 4500001001300000003000400013005001700017008004100034035001000075035001000085035001000095040001300105906004500118010001700163245005200180260002100232300002100253500004300274500017600317500020000493500016100693500019500854500017801049500022001227500020501447500019901652500017701851500021402028500021502242500016102457500014102618 77123332 DLC20051218154744.0981008b2001 ilu 000 0 eng  a57779 a90490 a93202 aDLCcDLC a0bundcorignewduencipf19gy-gencatlg a 77123332 00aVoyager Diacritic test -- New input 001 (SBIE). any :bny,c2001. a100 p. ;c12 cm. aNew copy imported from file (8/12/99). aVOYAGER COLUMN 0 (NEW): Degree sign (°); Phono Copyright mark (℗); Copyright mark (©); Sharp (♯); Inverted Question mark (¿); Inverted Exclamation mark (¡). aVOYAGER COLUMN 1: Script L (ℓ); Polish L (Ł); Scandanavian O (Ø); D with Crossbar (Đ); Icelandic Thorn (Þ); AE Digraph (Æ); OE Digraph (Œ); Miagkii Znak (ʹ); Dot at Midline (·). aVOYAGER COLUMN 2: Musical Flat (♭); Patent Mark (®); Plus or Minus (±); O Hook (Æ ); U Hook (Ư); Alif (ʼ); alpha α; Ayn (Ê»); Polish l (ł). aVOYAGER COLUMN 3: Scandanavian o (ø); d with crossbar (đ); Icelandic Thorn (þ); ae Digraph (æ); oe Digraph (œ); Tverdii Znak (ʺ); Turkish i (ı); British Pound (£); eth (ð). aVOYAGER COLUMN 4: Dagger (DO NOT USE); o Hook (Æ¡); u Hook (Æ°); Beta β; Gamma γ; Superscript 0 (⁰); Superscript 1 (¹); Superscript 2 (²); Superscript 3 (³). aVOYAGER COLUMN 5: Superscript 4 (⁴); Superscript 5 (⁵); Superscript 6 (⁶); Superscript 7 (⁷); Superscript 8 (⁸); Superscript 9 (⁹); Superscript + (⁺); Superscript - (⁻); Superscript ( (⁽). aVOYAGER COLUMN 6: Superscript ) (⁾); Subscript 0 (₀); Subscript 1 (₁); Subscript 2 (₂); Subscript 3 (₃); Subscript 4 (₄); Subscript 5 (₅); Subscript 6 (₆); Subscript 7 (₇). aVOYAGER COLUMN 7: Subscript 8 (₈); Subscript 9 (₉); Subscript + (₊); Subscript - (₋); Subscript ( (₍); Subscript ) (₎); Pseudo Question Mark (ỏ); Grave (ò); Acute (ó). aVOYAGER COLUMN 8: Circumflex (ô); Tilde (õ); Macron (ō); Breve (ŏ); Superior Dot (ȯ); Umlaut (ö); Hacek (ǒ); Circle Above (o̊); Ligature left (oÍ¡). aVOYAGER COLUMN 9: Ligature right (o) ; High Comma off center (o̕); Double Acute (ő); Candrabindu (o̐); Cedilla (o̧); Right Hook (ǫ); Dot Below (oÌ£); Double Dot Below (o̤); Circle Below (oÌ¥). aVOYAGER COLUMN 10: Double Underscore (o̳); Underscore (o̲); Left Hook (o̦); Right Cedilla (o̜); Upadhmaniya (oÌ®); Double Tilde 1st half (oÍ ); Double Tilde 2nd half (o) ; High Comma centered (o̓). aVOYAGER PC Keyboard: Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~). aStandard PC Keyboard: 1234567890-= !@#$%^&*()_+ qwertyuiop[]\ QWERTYUIOP{}| asdfghjkl;' ASDFGHJKL:" zxcvbnm,./ ZXCVBNM<>? \ No newline at end of file diff --git a/test/tmarc8.xml b/test/tmarc8.xml new file mode 100644 index 0000000..6ee9be7 --- /dev/null +++ b/test/tmarc8.xml @@ -0,0 +1,141 @@ + + + 02647nam^a2200469^^^4500 + UCD-002592301 + 20061209034435.0 + m d + cr bn |||a|bb| + 920330s1583 enk s 000 0 eng d + + 99851339eo + + + CL0036000039 + ProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106 + + + Cu-RivES + Cu-RivES + CStRLIN + dcrb + WaOLN + + + Clinton, Atkinson. + + + Clinton, Purser & Arnold, to their countreymen wheresoeuer + [electronic resource] : + Wherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, & their duetiful minds towardes her most excellent Maiestie + + + Clinton, Purser & Arnold, to their countreymen wheresoever + + + Clinton, Purser & Arnold, to their countreymen wheresoever + + + London : + Imprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church, + [1583?] + + + [12] p + + + In verse + + + The first poem is signed: Thomas Walton alias Purser + + + Clinton's full name and bookseller's name from, and publication date conjectured by, STC + + + Signatures: A⁴ B² + + + Reproduction of the original in the Bodleian Library + + + STC (2nd ed.) + 5431 + + + Also issued in print and on microform + + + Electronic reproduction. + Mode of access: World Wide Web. + Restricted to UC campuses + + + Electronic texts. + local + + + Pirates + England + Early works to 1800. + + + Walton, Thomas, + fl. 1583. + aut + + + Arnold, + fl. 1583. + aut + + + Early English books online + + + MER + kmain + + + SCB + nnet + + + Restricted to UC campuses + SCP UCSD + http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610 + + + Restricted to UC campuses + SCP UCSD + http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610 + + + DVXL + ELECT-GEN + Internet + + + LAGE + in + Online access + + + Restricted to UC campuses + SCP UCSD + http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610 + + + Restricted to UC campuses + http://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610 + CDL + + + Early English books, 1475-1640 ; + 1406:13. + + + DVXL + 002592301 + + + diff --git a/test/tmarc8.xml.marc b/test/tmarc8.xml.marc new file mode 100644 index 0000000..7a433b0 --- /dev/null +++ b/test/tmarc8.xml.marc @@ -0,0 +1 @@ +02643nam^a2200469^^^4500001001400000005001700014006001900031007001500050008004100065035001500106037009000121040004500211100002300256245028100279246006300560246006300623260014400686300001100830500001300841500005700854500009300911500002501004500005701029510002401086530004201110533008901152655002901241650004301270700003601313700002801349793003101377852001501408852001401423856015401437856015401591852003001745852002801775856015401803856014901957830004702106901002002153UCD-00259230120061209034435.0m d cr bn |||a|bb|920330s1583 enk s 000 0 eng d a99851339eo aCL0036000039bProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106 aCu-RivEScCu-RivESdCStRLINedcrbdWaOLN1 aClinton, Atkinson.00aClinton, Purser & Arnold, to their countreymen wheresoeuerh[electronic resource] :bWherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, & their duetiful minds towardes her most excellent Maiestie2 aClinton, Purser & Arnold, to their countreymen wheresoever2 aClinton, Purser & Arnold, to their countreymen wheresoever aLondon :bImprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church,c[1583?] a[12] p aIn verse aThe first poem is signed: Thomas Walton alias Purser aClinton's full name and bookseller's name from, and publication date conjectured by, STC aSignatures: A⁴ B² aReproduction of the original in the Bodleian Library4 aSTC (2nd ed.)c5431 aAlso issued in print and on microform aElectronic reproduction.nMode of access: World Wide Web.nRestricted to UC campuses 7aElectronic texts.2local 0aPirateszEnglandvEarly works to 1800.1 aWalton, Thomas,dfl. 1583.4aut1 aArnold,dfl. 1583.4aut0 aEarly English books online aMERbkmain aSCBbnnet40zRestricted to UC campusesxSCP UCSDuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:1661040zRestricted to UC campusesxSCP UCSDuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610 aDVXLbELECT-GENhInternet aLAGEbin3Online access40zRestricted to UC campusesxSCP UCSDuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:1661040zRestricted to UC campusesuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610xCDL 0aEarly English books, 1475-1640 ;v1406:13. aDVXLb002592301 \ No newline at end of file diff --git a/test/tmarc9.xml b/test/tmarc9.xml new file mode 100644 index 0000000..aaca7a6 --- /dev/null +++ b/test/tmarc9.xml @@ -0,0 +1,157 @@ + + + 02075cas a22005055a 4500 + 2005336282 + DLC + 20070911033614.0 + 070910c20059999mr uu p f0 0ara + + 2005336282 + + + -3-7-0709110002-p----- + + + (OCoLC)170490164 + + + 7 + und + serials + u + ncip + 19 + n-oclcserc + + + DLC + DLC + DLC + + + ara + fre + + + lc + + + f-mr--- + + + IN PROCESS + + + (3 + + + 880-01 + QadÌ£āʼ al-usrah : + majallah mutakhasÌ£sÌ£isÌ£ah / + Wizārat al-Ê»Adl. + + + Justice de la famille + + + 880-02 + Majallat QadÌ£āʼ al-usrah + <2006> + + + 880-03 + al-RabātÌ£ : + JamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah, + 2005- + + + v. : + ill. ; + 24 cm. + + + Irregular (semiannual) + + + 880-04 + al-Ê»Adad 1. (Yūlyūz 2005)- + + + 880-05 + Manshūrāt JamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah + + + Some issues have also a distinctive title. + + + Latest issue consulted: al-Ê»Adad 3. (Dujanbir 2006). + + + Chiefly in Arabic; some French. + + + Domestic relations (Islamic law) + Morocco. + + + Divorce (Islamic law) + + + Marriage law + Morocco. + + + Law reports, digests, etc. + Morocco. + + + 880-06 + JamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah. + + + 880-07 + Morocco. + Wizārat al-Ê»Adl. + + + DLC + + + 245-01/(3/r + قضاء الأسرة : + مجلة متخصصة / + وزارة العدل. + + + 246-02/(3/r + مجلة قضاء الأسرة + <2006> + + + 260-03/(3/r + الرباط : + جمعية نشر المعلومة القانونية والقضائية، + 2005- + + + 362-04/(3/r + العدد 1. (يوليوز 2005)- + + + 490-05/(3/r + منشورات جمعية نشر المعلومة القانونية والقضائية + + + 710-06/(3/r + جمعية نشر المعلومة القانونية والقضائية. + + + 710-07/(3/r + Morocco. + وزارة العدل. + + + LC Cairo Office [we 45] + + + diff --git a/test/tmarc9.xml.marc b/test/tmarc9.xml.marc new file mode 100644 index 0000000..9880e30 --- /dev/null +++ b/test/tmarc9.xml.marc @@ -0,0 +1 @@ +02244cas a22005055a 4500001001300000003000400013005001700017008004100034010001700075012003100092035002100123906004500144040001800189041001300207042000700220043001200227050001500239066000700254245008700261246002600348246004900374260011100423300002500534310002700559362004400586490010100630500004700731500005800778546003600836650004700872650002600919650002700945650004100972710008801013710004201101850000801143880009001151880005601241880011501297880005201412880010501464880009101569880005001660936002801710 2005336282DLC20070911033614.0070910c20059999mr uu p f0 0ara  a 2005336282 a-3-7-0709110002-p-----  a(OCoLC)170490164 a7bundcserialsduencipf19gn-oclcserc aDLCcDLCdDLC0 aaraafre alc af-mr---00aIN PROCESS c(3006880-01aQadÌ£āʼ al-usrah :bmajallah mutakhasÌ£sÌ£isÌ£ah /cWizārat al-Ê»Adl.13aJustice de la famille136880-02aMajallat QadÌ£āʼ al-usrahf<2006> 6880-03aal-RabātÌ£ :bJamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah,c2005- av. :bill. ;c24 cm. aIrregular (semiannual)0 6880-04aal-Ê»Adad 1. (Yūlyūz 2005)-0 6880-05aManshūrāt JamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah aSome issues have also a distinctive title. aLatest issue consulted: al-Ê»Adad 3. (Dujanbir 2006). aChiefly in Arabic; some French. 0aDomestic relations (Islamic law)zMorocco. 0aDivorce (Islamic law) 0aMarriage lawzMorocco. 0aLaw reports, digests, etc.zMorocco.2 6880-06aJamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah.1 6880-07aMorocco.bWizārat al-Ê»Adl. aDLC006245-01/(3/raقضاء الأسرة :bمجلة متخصصة /cوزارة العدل.136246-02/(3/raمجلة قضاء الأسرةf<2006> 6260-03/(3/raالرباط :bجمعية نشر المعلومة القانونية والقضائية،c2005-0 6362-04/(3/raالعدد 1. (يوليوز 2005)-0 6490-05/(3/raمنشورات جمعية نشر المعلومة القانونية والقضائية2 6710-06/(3/raجمعية نشر المعلومة القانونية والقضائية.1 6710-07/(3/raMorocco.bوزارة العدل. aLC Cairo Office [we 45] \ No newline at end of file diff --git a/test/tstmarc.sh b/test/tstmarc.sh index ff0b686..9e4d119 100755 --- a/test/tstmarc.sh +++ b/test/tstmarc.sh @@ -2,7 +2,9 @@ # Tests reading of ISO2709 and checks that we get identical MARCXML # # Reads marc?.marc files , Generates marc*.xml files -# If Libxml2 is present, the marc*.xml files are parsed again.. +# If Libxml2 is present, also turbomarc*xml. +# as well as reverse transformation from *marc*.xml files are parsed again.. +# srcdir=${srcdir:-.} ecode=0 @@ -11,64 +13,92 @@ if test $? = "3"; then noxml=1 fi -for f in ${srcdir}/marc[0-9].marc; do - fb=`basename ${f} .marc` - CHR=${srcdir}/${fb}.chr - NEW=${fb}.new.xml - OLD=${srcdir}/${fb}.xml - DIFF=`basename ${f}`.diff - ../util/yaz-marcdump -f `cat $CHR` -t utf-8 -o marcxml $f > $NEW - if test $? != "0"; then - echo "$f: yaz-marcdump returned error" - ecode=1 - elif test -f $OLD; then - if diff $OLD $NEW >$DIFF; then - rm $DIFF - rm $NEW - else - echo "$f: $NEW and $OLD differ" - ecode=1 - fi - else - echo "$f: Making test result $OLD for the first time" - if test -x /usr/bin/xmllint; then - if xmllint --noout $NEW >out 2>stderr; then - echo "$f: $NEW is well-formed" - mv $NEW $OLD - else - echo "$f: $NEW not well-formed" - ecode=1 - fi - else - echo "xmllint not found. install libxml2-utils" - ecode=1 - fi - fi +binmarc_convert() { + OUTPUT_FORMAT="$1" + REVERT_FORMAT="$2" + PREFIX="$3" + for f in ${srcdir}/marc[0-9].marc; do + fb=`basename ${f} .marc` + CHR=`cat ${srcdir}/${fb}.chr` + NEW=${PREFIX}${fb}.new.xml + OLD=${srcdir}/${PREFIX}${fb}.xml + DIFF=`basename ${f}`.diff + #echo "../util/yaz-marcdump -f $CHR -t utf-8 -i marc -o ${OUTPUT_FORMAT} $f > $NEW" + ../util/yaz-marcdump -f $CHR -t utf-8 -i marc -o ${OUTPUT_FORMAT} $f > $NEW + if test $? != "0"; then + echo "$f: yaz-marcdump returned error" + ecode=1 + elif test -f $OLD; then + if diff $OLD $NEW >$DIFF; then + rm $DIFF + rm $NEW + else + echo "$f: $NEW and $OLD differ" + ecode=1 + fi + else + echo "$f: Making test result $OLD for the first time" + if test -x /usr/bin/xmllint; then + if xmllint --noout $NEW >out 2>stderr; then + echo "$f: $NEW is well-formed" + mv $NEW $OLD + else + echo "$f: $NEW not well-formed" + ecode=1 + fi + else + echo "xmllint not found. install libxml2-utils" + ecode=1 + fi + fi + + if test -z "$noxml"; then + ORIGINAL=${f} + f=$OLD + # compare with original (binary) marc record. + OLD=${f}.marc + NEW=`basename ${f}`.new.marc + DIFF=`basename ${f}`.diff + #echo "../util/yaz-marcdump -f utf-8 -t utf-8 -i ${REVERT_FORMAT} -o marc $f > $NEW" + ../util/yaz-marcdump -f utf-8 -t utf-8 -i ${REVERT_FORMAT} -o marc $f > $NEW + if test $? != "0"; then + echo "Failed decode of $f" + ecode=1 + elif test -f $OLD; then + if diff $OLD $NEW >$DIFF; then + rm $DIFF + rm $NEW + else + echo "$f: $NEW and $OLD Differ" + ecode=1 + fi + else + echo "$f: Making test result $OLD for the first time" + mv $NEW $OLD + fi + # check with original + REVERT=`basename ${f}`.marc.revert + #../util/yaz-marcdump -f utf-8 -t $CHR -i ${REVERT_FORMAT} -o marc $f > $REVERT + #hexdump -cx $REVERT > $REVERT.hex + #hexdump -cx $ORIGINAL > $ORIGINAL.hex + #diff $REVERT.hex $ORIGINAL.hex > $REVERT.diff + fi + done + return $ecode +} + +binmarc_convert "marcxml" "marcxml" "" +echo "binmarc -> marcxml: $?" + +binmarc_convert "xml,marcxml" "marcxml" "xml2" +echo "binmarc -> marcxml(libxml2): $?" + +binmarc_convert "tmarcxml" "tmarcxml" "t" +echo "binmarc -> tmarcxml: $?" + +binmarc_convert "xml,tmarcxml" "tmarcxml" "xml2t" +echo "binmarc -> tmarcxml(libxml2): $?" - if test -z "$noxml"; then - f=$OLD - OLD=${f}.marc - NEW=`basename ${f}`.new.marc - DIFF=`basename ${f}`.diff - ../util/yaz-marcdump -f utf-8 -t utf-8 -i marcxml -o marc $f > $NEW - if test $? != "0"; then - echo "Failed decode of $f" - ecode=1 - elif test -f $OLD; then - if diff $OLD $NEW >$DIFF; then - rm $DIFF - rm $NEW - else - echo "$f: $NEW and $OLD Differ" - ecode=1 - fi - else - echo "$f: Making test result $OLD for the first time" - mv $NEW $OLD - fi - fi - -done exit $ecode # Local Variables: diff --git a/test/xml2marc1.xml b/test/xml2marc1.xml new file mode 100644 index 0000000..b355e9f --- /dev/null +++ b/test/xml2marc1.xml @@ -0,0 +1,2 @@ + +00988nam0a32003011 450 9 181 423 4710100anemu2002useng0axx1-4000-4596-7$14,00DBC200439SlomanLarryOn the road with Bob DylanLarry "Ratso" SlomanRevised editionThree Rivers PressNew YorkThree Rivers Press2002xv, 464 sider, tavlerLarry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue"På omslaget: With a new introduction by Kinky FriedmanTidligere: 1. udgave. New York, Bantam, 197899.4DylanBob78.90645folkemusikfolkemusikererockmusikrockmusikererockkoncerterUSA1970-1979 diff --git a/test/xml2marc1.xml.marc b/test/xml2marc1.xml.marc new file mode 100644 index 0000000..efc7bdf --- /dev/null +++ b/test/xml2marc1.xml.marc @@ -0,0 +1 @@ +00989nam0a32003011 450 001002800000004001000028008002800038009001100066021002700077032001500104100002100119245005400140250004100194260004000235300002700275504012300302512006100425520005000486652002400536652001600560666001600576666001900592666001500611666001800626666001900644666000900663666001500672000a9 181 423 4b710100fa000rnae000tmuua2002buslengv0000aagxx000a1-4000-4596-7d$14,00000&DBC2004390000aSlomanhLarry000aOn the road with Bob DylaneLarry "Ratso" Sloman000aRevised editionbThree Rivers Press000aNew YorkbThree Rivers Pressc2002000axv, 464 sider, tavler000aLarry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue"000aPÃ¥ omslaget: With a new introduction by Kinky Friedman000aTidligere: 1. udgave. New York, Bantam, 19780000m99.4aDylanhBob000p78.9064v5000ffolkemusik000ffolkemusikere000frockmusik000frockmusikere000frockkoncerter000eUSA000i1970-1979 \ No newline at end of file diff --git a/test/xml2marc2.xml b/test/xml2marc2.xml new file mode 100644 index 0000000..9252e5c --- /dev/null +++ b/test/xml2marc2.xml @@ -0,0 +1,2 @@ + +01116nam0a32002171 450 9 182 502 3710100acesf1995gbeng0sxcbefMimmsGarnetCry babyWarm and soulfulGarnet Mimms ... [et al.]Bury St. EdmundsBGO19951 cdIndspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful)Indhold:BGOBGOCD26878.7944soulrhythm & bluesvokal1960-1969USA11Cry babyNobody but youUntil you were goneAnytime you want meSo closeFor your precious loveBaby don't you weepA ¤quiet placeCry to meDon't change your heartWanting youThe ¤truth hurtsI'll take good care of youLooking for youIt won't hurt (half as much)It was easier to hurt herThinkin'Prove it to meMore than a miracleAs long as I have youOne girlThere goes my babyIt's just a matter of timeA ¤little bit of soapLook awayI'll make it up to you4001 girl diff --git a/test/xml2marc2.xml.marc b/test/xml2marc2.xml.marc new file mode 100644 index 0000000..106fce3 --- /dev/null +++ b/test/xml2marc2.xml.marc @@ -0,0 +1 @@ +01121nam0a32002171 450 001002800000004001000028008002800038009001100066039000900077100001900086245005900105260003300164300001000197512007300207531001400280538001900294652001500313666004900328795050600377795002000883000a9 182 502 3b710100fa000rcae000tsufa1995bgblengv0000asgxc000abef000aMimmshGarnet000aCry babyaWarm and soulfuleGarnet Mimms ... [et al.]000aBury St. EdmundsbBGOc1995000n1 cd000aIndspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful)000aIndhold:000fBGOgBGOCD268000m78.794v4000msoulmrhythm & bluesnvokalp1960-1969lUSA000Ã¥11aCry babyaNobody but youaUntil you were goneaAnytime you want meaSo closeaFor your precious loveaBaby don't you weepaA ¤quiet placeaCry to meaDon't change your heartaWanting youaThe ¤truth hurtsaI'll take good care of youaLooking for youaIt won't hurt (half as much)aIt was easier to hurt heraThinkin'aProve it to meaMore than a miracleaAs long as I have youaOne girlaThere goes my babyaIt's just a matter of timeaA ¤little bit of soapaLook awayaI'll make it up to you000Ã¥40y0a1 girl \ No newline at end of file diff --git a/test/xml2marc3.xml b/test/xml2marc3.xml new file mode 100644 index 0000000..74de296 --- /dev/null +++ b/test/xml2marc3.xml @@ -0,0 +1,2 @@ + +00914naa a2200337 450 a00001508ain1991xxnora9axxnoreng06Byfornyelse ved Ibsen-RingenfarvefotoplansnitByggekunst19911/241-45byfornyelsesaneringNorgeOsloTelje Torp Aasen ArkitektkontorKristian Augustsgate 7BEng, Dagfinanlund, TomKristian AugustsgatePilestredet 19aITMARK50000014519911/241-4520020111ARK01200220020111ARK01211620021002ARK011000ICLLOAD0020021122ARK01194820030618ARK011330a00001508 diff --git a/test/xml2marc3.xml.marc b/test/xml2marc3.xml.marc new file mode 100644 index 0000000..64f2cef --- /dev/null +++ b/test/xml2marc3.xml.marc @@ -0,0 +1 @@ +00914naa a2200337 450 001001700000004000900017008002400026009001000050041000800060041000800068097000700076245003300083300002600116557003300142630001600175630001300191633001000204633000900214648006100223648001600284648005400300J01000600354BAS000500360LKR004200365CAT003000407CAT003000437CAT003000467CAT003900497CAT002600536UID001400562 aa00001508fa airn a1991bxxlnortav9 aagxx anor deng00a06 aByfornyelse ved Ibsen-Ringen bfarvefotobplanbsnit aByggekunstj1991v1/2k41-45 fbyfornyelse fsanering fNorge fOslo aTelje Torp Aasen ArkitektkontorcKristian Augustsgate 7B aEng, Dagfin ranlund, TomcKristian AugustsgatecPilestredet 19 aa 0 aITMlARK50b0000145y1991i1/2k41-45 abc20020111lARK01h2002 abc20020111lARK01h2116 abc20021002lARK01h1000 aICLLOADb00c20021122lARK01h1948 c20030618lARK01h1330 aa00001508 \ No newline at end of file diff --git a/test/xml2marc4.xml b/test/xml2marc4.xml new file mode 100644 index 0000000..198946a --- /dev/null +++ b/test/xml2marc4.xml @@ -0,0 +1,2 @@ + +009140091a22a 22003370 diff --git a/test/xml2marc4.xml.marc b/test/xml2marc4.xml.marc new file mode 100644 index 0000000..9b3d907 --- /dev/null +++ b/test/xml2marc4.xml.marc @@ -0,0 +1 @@ +000260091a2200025003370  \ No newline at end of file diff --git a/test/xml2marc5.xml b/test/xml2marc5.xml new file mode 100644 index 0000000..3202f12 --- /dev/null +++ b/test/xml2marc5.xml @@ -0,0 +1,2 @@ + +00492nam a22001455a 450000027748520051026111436.0050413s1894 gr 000 0 gre dΜαρούδης, Κωνσταντίνος ΙωΕλληνικόν κρυπτογραφικόν λεξικόν /Κωνστ. Ι. Μαρούδης. εκδ.Αθήνα,1894.248 σελ.Greek language, ModernDialectsDictionariesCryptography. diff --git a/test/xml2marc5.xml.marc b/test/xml2marc5.xml.marc new file mode 100644 index 0000000..50102a7 --- /dev/null +++ b/test/xml2marc5.xml.marc @@ -0,0 +1 @@ +00492nam a22001455a 450000100100000000500170001000800410002710000520006824501040012025000140022426000230023830000160026165000510027765000180032800027748520051026111436.0050413s1894 gr 000 0 gre d1 aΜαρούδης, Κωνσταντίνος Ιω10aΕλληνικόν κρυπτογραφικόν λεξικόν /cΚωνστ. Ι. Μαρούδης. η εκδ. aΑθήνα,c1894. a248 σελ. 0aGreek language, ModernxDialectsvDictionaries 0aCryptography. \ No newline at end of file diff --git a/test/xml2marc6.xml b/test/xml2marc6.xml new file mode 100644 index 0000000..911e2a5 --- /dev/null +++ b/test/xml2marc6.xml @@ -0,0 +1,2 @@ + +00366nam a22001698a 4500 11224466 DLC00000000000000.0910710c19910701nju 00010 eng 11224466 DLCDLC123-xyzJack CollinsHow to program a computerPenguin8710p. cm. diff --git a/test/xml2marc6.xml.marc b/test/xml2marc6.xml.marc new file mode 100644 index 0000000..400a01a --- /dev/null +++ b/test/xml2marc6.xml.marc @@ -0,0 +1 @@ +00366nam a22001698a 4500001001300000003000400013005001700017008004100034010001700075040001300092050001200105100001700117245003000134260001200164263000900176300001100185 11224466 DLC00000000000000.0910710c19910701nju 00010 eng  a 11224466  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. \ No newline at end of file diff --git a/test/xml2marc7.xml b/test/xml2marc7.xml new file mode 100644 index 0000000..9c11aa6 --- /dev/null +++ b/test/xml2marc7.xml @@ -0,0 +1,2 @@ + +03114cam a2200349 i 4500 77123332 DLC20051218154744.0981008b2001 ilu 000 0 eng 577799049093202DLCDLC0undorignewuncip19y-gencatlg 77123332 Voyager Diacritic test -- New input 001 (SBIE).ny :ny,2001.100 p. ;12 cm.New copy imported from file (8/12/99).VOYAGER COLUMN 0 (NEW): Degree sign (°); Phono Copyright mark (℗); Copyright mark (©); Sharp (♯); Inverted Question mark (¿); Inverted Exclamation mark (¡).VOYAGER COLUMN 1: Script L (ℓ); Polish L (Ł); Scandanavian O (Ø); D with Crossbar (Đ); Icelandic Thorn (Þ); AE Digraph (Æ); OE Digraph (Œ); Miagkii Znak (ʹ); Dot at Midline (·).VOYAGER COLUMN 2: Musical Flat (♭); Patent Mark (®); Plus or Minus (±); O Hook (Ơ); U Hook (Ư); Alif (ʼ); alpha α; Ayn (ʻ); Polish l (ł).VOYAGER COLUMN 3: Scandanavian o (ø); d with crossbar (đ); Icelandic Thorn (þ); ae Digraph (æ); oe Digraph (œ); Tverdii Znak (ʺ); Turkish i (ı); British Pound (£); eth (ð).VOYAGER COLUMN 4: Dagger (DO NOT USE); o Hook (ơ); u Hook (ư); Beta β; Gamma γ; Superscript 0 (⁰); Superscript 1 (¹); Superscript 2 (²); Superscript 3 (³).VOYAGER COLUMN 5: Superscript 4 (⁴); Superscript 5 (⁵); Superscript 6 (⁶); Superscript 7 (⁷); Superscript 8 (⁸); Superscript 9 (⁹); Superscript + (⁺); Superscript - (⁻); Superscript ( (⁽).VOYAGER COLUMN 6: Superscript ) (⁾); Subscript 0 (₀); Subscript 1 (₁); Subscript 2 (₂); Subscript 3 (₃); Subscript 4 (₄); Subscript 5 (₅); Subscript 6 (₆); Subscript 7 (₇).VOYAGER COLUMN 7: Subscript 8 (₈); Subscript 9 (₉); Subscript + (₊); Subscript - (₋); Subscript ( (₍); Subscript ) (₎); Pseudo Question Mark (ỏ); Grave (ò); Acute (ó).VOYAGER COLUMN 8: Circumflex (ô); Tilde (õ); Macron (ō); Breve (ŏ); Superior Dot (ȯ); Umlaut (ö); Hacek (ǒ); Circle Above (o̊); Ligature left (o͡).VOYAGER COLUMN 9: Ligature right (o) ; High Comma off center (o̕); Double Acute (ő); Candrabindu (o̐); Cedilla (o̧); Right Hook (ǫ); Dot Below (ọ); Double Dot Below (o̤); Circle Below (o̥).VOYAGER COLUMN 10: Double Underscore (o̳); Underscore (o̲); Left Hook (o̦); Right Cedilla (o̜); Upadhmaniya (o̮); Double Tilde 1st half (o͠); Double Tilde 2nd half (o) ; High Comma centered (o̓).VOYAGER PC Keyboard: Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~).Standard PC Keyboard: 1234567890-= !@#$%^&*()_+ qwertyuiop[]\ QWERTYUIOP{}| asdfghjkl;' ASDFGHJKL:" zxcvbnm,./ ZXCVBNM<>? diff --git a/test/xml2marc7.xml.marc b/test/xml2marc7.xml.marc new file mode 100644 index 0000000..e6315df --- /dev/null +++ b/test/xml2marc7.xml.marc @@ -0,0 +1 @@ +03109cam a2200349 i 4500001001300000003000400013005001700017008004100034035001000075035001000085035001000095040001300105906004500118010001700163245005200180260002100232300002100253500004300274500017600317500020000493500016100693500019500854500017801049500022001227500020501447500019901652500017701851500021402028500021502242500016102457500014102618 77123332 DLC20051218154744.0981008b2001 ilu 000 0 eng  a57779 a90490 a93202 aDLCcDLC a0bundcorignewduencipf19gy-gencatlg a 77123332 00aVoyager Diacritic test -- New input 001 (SBIE). any :bny,c2001. a100 p. ;c12 cm. aNew copy imported from file (8/12/99). aVOYAGER COLUMN 0 (NEW): Degree sign (°); Phono Copyright mark (℗); Copyright mark (©); Sharp (♯); Inverted Question mark (¿); Inverted Exclamation mark (¡). aVOYAGER COLUMN 1: Script L (ℓ); Polish L (Ł); Scandanavian O (Ø); D with Crossbar (Đ); Icelandic Thorn (Þ); AE Digraph (Æ); OE Digraph (Œ); Miagkii Znak (ʹ); Dot at Midline (·). aVOYAGER COLUMN 2: Musical Flat (♭); Patent Mark (®); Plus or Minus (±); O Hook (Æ ); U Hook (Ư); Alif (ʼ); alpha α; Ayn (Ê»); Polish l (ł). aVOYAGER COLUMN 3: Scandanavian o (ø); d with crossbar (đ); Icelandic Thorn (þ); ae Digraph (æ); oe Digraph (œ); Tverdii Znak (ʺ); Turkish i (ı); British Pound (£); eth (ð). aVOYAGER COLUMN 4: Dagger (DO NOT USE); o Hook (Æ¡); u Hook (Æ°); Beta β; Gamma γ; Superscript 0 (⁰); Superscript 1 (¹); Superscript 2 (²); Superscript 3 (³). aVOYAGER COLUMN 5: Superscript 4 (⁴); Superscript 5 (⁵); Superscript 6 (⁶); Superscript 7 (⁷); Superscript 8 (⁸); Superscript 9 (⁹); Superscript + (⁺); Superscript - (⁻); Superscript ( (⁽). aVOYAGER COLUMN 6: Superscript ) (⁾); Subscript 0 (₀); Subscript 1 (₁); Subscript 2 (₂); Subscript 3 (₃); Subscript 4 (₄); Subscript 5 (₅); Subscript 6 (₆); Subscript 7 (₇). aVOYAGER COLUMN 7: Subscript 8 (₈); Subscript 9 (₉); Subscript + (₊); Subscript - (₋); Subscript ( (₍); Subscript ) (₎); Pseudo Question Mark (ỏ); Grave (ò); Acute (ó). aVOYAGER COLUMN 8: Circumflex (ô); Tilde (õ); Macron (ō); Breve (ŏ); Superior Dot (ȯ); Umlaut (ö); Hacek (ǒ); Circle Above (o̊); Ligature left (oÍ¡). aVOYAGER COLUMN 9: Ligature right (o) ; High Comma off center (o̕); Double Acute (ő); Candrabindu (o̐); Cedilla (o̧); Right Hook (ǫ); Dot Below (oÌ£); Double Dot Below (o̤); Circle Below (oÌ¥). aVOYAGER COLUMN 10: Double Underscore (o̳); Underscore (o̲); Left Hook (o̦); Right Cedilla (o̜); Upadhmaniya (oÌ®); Double Tilde 1st half (oÍ ); Double Tilde 2nd half (o) ; High Comma centered (o̓). aVOYAGER PC Keyboard: Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~). aStandard PC Keyboard: 1234567890-= !@#$%^&*()_+ qwertyuiop[]\ QWERTYUIOP{}| asdfghjkl;' ASDFGHJKL:" zxcvbnm,./ ZXCVBNM<>? \ No newline at end of file diff --git a/test/xml2marc8.xml b/test/xml2marc8.xml new file mode 100644 index 0000000..721adc4 --- /dev/null +++ b/test/xml2marc8.xml @@ -0,0 +1,2 @@ + +02647nam^a2200469^^^4500UCD-00259230120061209034435.0m d cr bn |||a|bb|920330s1583 enk s 000 0 eng d99851339eoCL0036000039ProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106Cu-RivESCu-RivESCStRLINdcrbWaOLNClinton, Atkinson.Clinton, Purser & Arnold, to their countreymen wheresoeuer[electronic resource] :Wherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, & their duetiful minds towardes her most excellent MaiestieClinton, Purser & Arnold, to their countreymen wheresoeverClinton, Purser & Arnold, to their countreymen wheresoeverLondon :Imprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church,[1583?][12] pIn verseThe first poem is signed: Thomas Walton alias PurserClinton's full name and bookseller's name from, and publication date conjectured by, STCSignatures: A⁴ B²Reproduction of the original in the Bodleian LibrarySTC (2nd ed.)5431Also issued in print and on microformElectronic reproduction.Mode of access: World Wide Web.Restricted to UC campusesElectronic texts.localPiratesEnglandEarly works to 1800.Walton, Thomas,fl. 1583.autArnold,fl. 1583.autEarly English books onlineMERkmainSCBnnetRestricted to UC campusesSCP UCSDhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610Restricted to UC campusesSCP UCSDhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610DVXLELECT-GENInternetLAGEinOnline accessRestricted to UC campusesSCP UCSDhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610Restricted to UC campuseshttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610CDLEarly English books, 1475-1640 ;1406:13.DVXL002592301 diff --git a/test/xml2marc8.xml.marc b/test/xml2marc8.xml.marc new file mode 100644 index 0000000..7a433b0 --- /dev/null +++ b/test/xml2marc8.xml.marc @@ -0,0 +1 @@ +02643nam^a2200469^^^4500001001400000005001700014006001900031007001500050008004100065035001500106037009000121040004500211100002300256245028100279246006300560246006300623260014400686300001100830500001300841500005700854500009300911500002501004500005701029510002401086530004201110533008901152655002901241650004301270700003601313700002801349793003101377852001501408852001401423856015401437856015401591852003001745852002801775856015401803856014901957830004702106901002002153UCD-00259230120061209034435.0m d cr bn |||a|bb|920330s1583 enk s 000 0 eng d a99851339eo aCL0036000039bProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106 aCu-RivEScCu-RivESdCStRLINedcrbdWaOLN1 aClinton, Atkinson.00aClinton, Purser & Arnold, to their countreymen wheresoeuerh[electronic resource] :bWherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, & their duetiful minds towardes her most excellent Maiestie2 aClinton, Purser & Arnold, to their countreymen wheresoever2 aClinton, Purser & Arnold, to their countreymen wheresoever aLondon :bImprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church,c[1583?] a[12] p aIn verse aThe first poem is signed: Thomas Walton alias Purser aClinton's full name and bookseller's name from, and publication date conjectured by, STC aSignatures: A⁴ B² aReproduction of the original in the Bodleian Library4 aSTC (2nd ed.)c5431 aAlso issued in print and on microform aElectronic reproduction.nMode of access: World Wide Web.nRestricted to UC campuses 7aElectronic texts.2local 0aPirateszEnglandvEarly works to 1800.1 aWalton, Thomas,dfl. 1583.4aut1 aArnold,dfl. 1583.4aut0 aEarly English books online aMERbkmain aSCBbnnet40zRestricted to UC campusesxSCP UCSDuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:1661040zRestricted to UC campusesxSCP UCSDuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610 aDVXLbELECT-GENhInternet aLAGEbin3Online access40zRestricted to UC campusesxSCP UCSDuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:1661040zRestricted to UC campusesuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610xCDL 0aEarly English books, 1475-1640 ;v1406:13. aDVXLb002592301 \ No newline at end of file diff --git a/test/xml2marc9.xml b/test/xml2marc9.xml new file mode 100644 index 0000000..05b2236 --- /dev/null +++ b/test/xml2marc9.xml @@ -0,0 +1,2 @@ + +02075cas a22005055a 4500 2005336282DLC20070911033614.0070910c20059999mr uu p f0 0ara 2005336282-3-7-0709110002-p----- (OCoLC)1704901647undserialsuncip19n-oclcsercDLCDLCDLCarafrelcf-mr---IN PROCESS(3880-01Qaḍāʼ al-usrah :majallah mutakhaṣṣiṣah /Wizārat al-ʻAdl.Justice de la famille880-02Majallat Qaḍāʼ al-usrah<2006>880-03al-Rabāṭ :Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah,2005-v. :ill. ;24 cm.Irregular (semiannual)880-04al-ʻAdad 1. (Yūlyūz 2005)-880-05Manshūrāt Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-QaḍāʼīyahSome issues have also a distinctive title.Latest issue consulted: al-ʻAdad 3. (Dujanbir 2006).Chiefly in Arabic; some French.Domestic relations (Islamic law)Morocco.Divorce (Islamic law)Marriage lawMorocco.Law reports, digests, etc.Morocco.880-06Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah.880-07Morocco.Wizārat al-ʻAdl.DLC245-01/(3/rقضاء الأسرة :مجلة متخصصة /وزارة العدل.246-02/(3/rمجلة قضاء الأسرة<2006>260-03/(3/rالرباط :جمعية نشر المعلومة القانونية والقضائية،2005-362-04/(3/rالعدد 1. (يوليوز 2005)-490-05/(3/rمنشورات جمعية نشر المعلومة القانونية والقضائية710-06/(3/rجمعية نشر المعلومة القانونية والقضائية.710-07/(3/rMorocco.وزارة العدل.LC Cairo Office [we 45] diff --git a/test/xml2marc9.xml.marc b/test/xml2marc9.xml.marc new file mode 100644 index 0000000..9880e30 --- /dev/null +++ b/test/xml2marc9.xml.marc @@ -0,0 +1 @@ +02244cas a22005055a 4500001001300000003000400013005001700017008004100034010001700075012003100092035002100123906004500144040001800189041001300207042000700220043001200227050001500239066000700254245008700261246002600348246004900374260011100423300002500534310002700559362004400586490010100630500004700731500005800778546003600836650004700872650002600919650002700945650004100972710008801013710004201101850000801143880009001151880005601241880011501297880005201412880010501464880009101569880005001660936002801710 2005336282DLC20070911033614.0070910c20059999mr uu p f0 0ara  a 2005336282 a-3-7-0709110002-p-----  a(OCoLC)170490164 a7bundcserialsduencipf19gn-oclcserc aDLCcDLCdDLC0 aaraafre alc af-mr---00aIN PROCESS c(3006880-01aQadÌ£āʼ al-usrah :bmajallah mutakhasÌ£sÌ£isÌ£ah /cWizārat al-Ê»Adl.13aJustice de la famille136880-02aMajallat QadÌ£āʼ al-usrahf<2006> 6880-03aal-RabātÌ£ :bJamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah,c2005- av. :bill. ;c24 cm. aIrregular (semiannual)0 6880-04aal-Ê»Adad 1. (Yūlyūz 2005)-0 6880-05aManshūrāt JamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah aSome issues have also a distinctive title. aLatest issue consulted: al-Ê»Adad 3. (Dujanbir 2006). aChiefly in Arabic; some French. 0aDomestic relations (Islamic law)zMorocco. 0aDivorce (Islamic law) 0aMarriage lawzMorocco. 0aLaw reports, digests, etc.zMorocco.2 6880-06aJamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah.1 6880-07aMorocco.bWizārat al-Ê»Adl. aDLC006245-01/(3/raقضاء الأسرة :bمجلة متخصصة /cوزارة العدل.136246-02/(3/raمجلة قضاء الأسرةf<2006> 6260-03/(3/raالرباط :bجمعية نشر المعلومة القانونية والقضائية،c2005-0 6362-04/(3/raالعدد 1. (يوليوز 2005)-0 6490-05/(3/raمنشورات جمعية نشر المعلومة القانونية والقضائية2 6710-06/(3/raجمعية نشر المعلومة القانونية والقضائية.1 6710-07/(3/raMorocco.bوزارة العدل. aLC Cairo Office [we 45] \ No newline at end of file diff --git a/test/xml2tmarc1.xml b/test/xml2tmarc1.xml new file mode 100644 index 0000000..b7a3def --- /dev/null +++ b/test/xml2tmarc1.xml @@ -0,0 +1,2 @@ + +00988nam0a32003011 450 9 181 423 4710100anemu2002useng0axx1-4000-4596-7$14,00DBC200439SlomanLarryOn the road with Bob DylanLarry "Ratso" SlomanRevised editionThree Rivers PressNew YorkThree Rivers Press2002xv, 464 sider, tavlerLarry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue"På omslaget: With a new introduction by Kinky FriedmanTidligere: 1. udgave. New York, Bantam, 197899.4DylanBob78.90645folkemusikfolkemusikererockmusikrockmusikererockkoncerterUSA1970-1979 diff --git a/test/xml2tmarc1.xml.marc b/test/xml2tmarc1.xml.marc new file mode 100644 index 0000000..efc7bdf --- /dev/null +++ b/test/xml2tmarc1.xml.marc @@ -0,0 +1 @@ +00989nam0a32003011 450 001002800000004001000028008002800038009001100066021002700077032001500104100002100119245005400140250004100194260004000235300002700275504012300302512006100425520005000486652002400536652001600560666001600576666001900592666001500611666001800626666001900644666000900663666001500672000a9 181 423 4b710100fa000rnae000tmuua2002buslengv0000aagxx000a1-4000-4596-7d$14,00000&DBC2004390000aSlomanhLarry000aOn the road with Bob DylaneLarry "Ratso" Sloman000aRevised editionbThree Rivers Press000aNew YorkbThree Rivers Pressc2002000axv, 464 sider, tavler000aLarry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue"000aPÃ¥ omslaget: With a new introduction by Kinky Friedman000aTidligere: 1. udgave. New York, Bantam, 19780000m99.4aDylanhBob000p78.9064v5000ffolkemusik000ffolkemusikere000frockmusik000frockmusikere000frockkoncerter000eUSA000i1970-1979 \ No newline at end of file diff --git a/test/xml2tmarc2.xml b/test/xml2tmarc2.xml new file mode 100644 index 0000000..bb448af --- /dev/null +++ b/test/xml2tmarc2.xml @@ -0,0 +1,2 @@ + +01116nam0a32002171 450 9 182 502 3710100acesf1995gbeng0sxcbefMimmsGarnetCry babyWarm and soulfulGarnet Mimms ... [et al.]Bury St. EdmundsBGO19951 cdIndspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful)Indhold:BGOBGOCD26878.7944soulrhythm & bluesvokal1960-1969USA11Cry babyNobody but youUntil you were goneAnytime you want meSo closeFor your precious loveBaby don't you weepA ¤quiet placeCry to meDon't change your heartWanting youThe ¤truth hurtsI'll take good care of youLooking for youIt won't hurt (half as much)It was easier to hurt herThinkin'Prove it to meMore than a miracleAs long as I have youOne girlThere goes my babyIt's just a matter of timeA ¤little bit of soapLook awayI'll make it up to you4001 girl diff --git a/test/xml2tmarc2.xml.marc b/test/xml2tmarc2.xml.marc new file mode 100644 index 0000000..106fce3 --- /dev/null +++ b/test/xml2tmarc2.xml.marc @@ -0,0 +1 @@ +01121nam0a32002171 450 001002800000004001000028008002800038009001100066039000900077100001900086245005900105260003300164300001000197512007300207531001400280538001900294652001500313666004900328795050600377795002000883000a9 182 502 3b710100fa000rcae000tsufa1995bgblengv0000asgxc000abef000aMimmshGarnet000aCry babyaWarm and soulfuleGarnet Mimms ... [et al.]000aBury St. EdmundsbBGOc1995000n1 cd000aIndspilninger publiceret 1963 (Cry baby) og 1965 (Warm and soulful)000aIndhold:000fBGOgBGOCD268000m78.794v4000msoulmrhythm & bluesnvokalp1960-1969lUSA000Ã¥11aCry babyaNobody but youaUntil you were goneaAnytime you want meaSo closeaFor your precious loveaBaby don't you weepaA ¤quiet placeaCry to meaDon't change your heartaWanting youaThe ¤truth hurtsaI'll take good care of youaLooking for youaIt won't hurt (half as much)aIt was easier to hurt heraThinkin'aProve it to meaMore than a miracleaAs long as I have youaOne girlaThere goes my babyaIt's just a matter of timeaA ¤little bit of soapaLook awayaI'll make it up to you000Ã¥40y0a1 girl \ No newline at end of file diff --git a/test/xml2tmarc3.xml b/test/xml2tmarc3.xml new file mode 100644 index 0000000..beff0bc --- /dev/null +++ b/test/xml2tmarc3.xml @@ -0,0 +1,2 @@ + +00914naa a2200337 450 a00001508ain1991xxnora9axxnoreng06Byfornyelse ved Ibsen-RingenfarvefotoplansnitByggekunst19911/241-45byfornyelsesaneringNorgeOsloTelje Torp Aasen ArkitektkontorKristian Augustsgate 7BEng, Dagfinanlund, TomKristian AugustsgatePilestredet 19aITMARK50000014519911/241-4520020111ARK01200220020111ARK01211620021002ARK011000ICLLOAD0020021122ARK01194820030618ARK011330a00001508 diff --git a/test/xml2tmarc3.xml.marc b/test/xml2tmarc3.xml.marc new file mode 100644 index 0000000..64f2cef --- /dev/null +++ b/test/xml2tmarc3.xml.marc @@ -0,0 +1 @@ +00914naa a2200337 450 001001700000004000900017008002400026009001000050041000800060041000800068097000700076245003300083300002600116557003300142630001600175630001300191633001000204633000900214648006100223648001600284648005400300J01000600354BAS000500360LKR004200365CAT003000407CAT003000437CAT003000467CAT003900497CAT002600536UID001400562 aa00001508fa airn a1991bxxlnortav9 aagxx anor deng00a06 aByfornyelse ved Ibsen-Ringen bfarvefotobplanbsnit aByggekunstj1991v1/2k41-45 fbyfornyelse fsanering fNorge fOslo aTelje Torp Aasen ArkitektkontorcKristian Augustsgate 7B aEng, Dagfin ranlund, TomcKristian AugustsgatecPilestredet 19 aa 0 aITMlARK50b0000145y1991i1/2k41-45 abc20020111lARK01h2002 abc20020111lARK01h2116 abc20021002lARK01h1000 aICLLOADb00c20021122lARK01h1948 c20030618lARK01h1330 aa00001508 \ No newline at end of file diff --git a/test/xml2tmarc4.xml b/test/xml2tmarc4.xml new file mode 100644 index 0000000..e14a717 --- /dev/null +++ b/test/xml2tmarc4.xml @@ -0,0 +1,2 @@ + +009140091a22a 22003370 diff --git a/test/xml2tmarc4.xml.marc b/test/xml2tmarc4.xml.marc new file mode 100644 index 0000000..9b3d907 --- /dev/null +++ b/test/xml2tmarc4.xml.marc @@ -0,0 +1 @@ +000260091a2200025003370  \ No newline at end of file diff --git a/test/xml2tmarc5.xml b/test/xml2tmarc5.xml new file mode 100644 index 0000000..ce6cbfe --- /dev/null +++ b/test/xml2tmarc5.xml @@ -0,0 +1,2 @@ + +00492nam a22001455a 450000027748520051026111436.0050413s1894 gr 000 0 gre dΜαρούδης, Κωνσταντίνος ΙωΕλληνικόν κρυπτογραφικόν λεξικόν /Κωνστ. Ι. Μαρούδης. εκδ.Αθήνα,1894.248 σελ.Greek language, ModernDialectsDictionariesCryptography. diff --git a/test/xml2tmarc5.xml.marc b/test/xml2tmarc5.xml.marc new file mode 100644 index 0000000..50102a7 --- /dev/null +++ b/test/xml2tmarc5.xml.marc @@ -0,0 +1 @@ +00492nam a22001455a 450000100100000000500170001000800410002710000520006824501040012025000140022426000230023830000160026165000510027765000180032800027748520051026111436.0050413s1894 gr 000 0 gre d1 aΜαρούδης, Κωνσταντίνος Ιω10aΕλληνικόν κρυπτογραφικόν λεξικόν /cΚωνστ. Ι. Μαρούδης. η εκδ. aΑθήνα,c1894. a248 σελ. 0aGreek language, ModernxDialectsvDictionaries 0aCryptography. \ No newline at end of file diff --git a/test/xml2tmarc6.xml b/test/xml2tmarc6.xml new file mode 100644 index 0000000..8ff71ef --- /dev/null +++ b/test/xml2tmarc6.xml @@ -0,0 +1,2 @@ + +00366nam a22001698a 4500 11224466 DLC00000000000000.0910710c19910701nju 00010 eng 11224466 DLCDLC123-xyzJack CollinsHow to program a computerPenguin8710p. cm. diff --git a/test/xml2tmarc6.xml.marc b/test/xml2tmarc6.xml.marc new file mode 100644 index 0000000..400a01a --- /dev/null +++ b/test/xml2tmarc6.xml.marc @@ -0,0 +1 @@ +00366nam a22001698a 4500001001300000003000400013005001700017008004100034010001700075040001300092050001200105100001700117245003000134260001200164263000900176300001100185 11224466 DLC00000000000000.0910710c19910701nju 00010 eng  a 11224466  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. \ No newline at end of file diff --git a/test/xml2tmarc7.xml b/test/xml2tmarc7.xml new file mode 100644 index 0000000..35674e9 --- /dev/null +++ b/test/xml2tmarc7.xml @@ -0,0 +1,2 @@ + +03114cam a2200349 i 4500 77123332 DLC20051218154744.0981008b2001 ilu 000 0 eng 577799049093202DLCDLC0undorignewuncip19y-gencatlg 77123332 Voyager Diacritic test -- New input 001 (SBIE).ny :ny,2001.100 p. ;12 cm.New copy imported from file (8/12/99).VOYAGER COLUMN 0 (NEW): Degree sign (°); Phono Copyright mark (℗); Copyright mark (©); Sharp (♯); Inverted Question mark (¿); Inverted Exclamation mark (¡).VOYAGER COLUMN 1: Script L (ℓ); Polish L (Ł); Scandanavian O (Ø); D with Crossbar (Đ); Icelandic Thorn (Þ); AE Digraph (Æ); OE Digraph (Œ); Miagkii Znak (ʹ); Dot at Midline (·).VOYAGER COLUMN 2: Musical Flat (♭); Patent Mark (®); Plus or Minus (±); O Hook (Ơ); U Hook (Ư); Alif (ʼ); alpha α; Ayn (ʻ); Polish l (ł).VOYAGER COLUMN 3: Scandanavian o (ø); d with crossbar (đ); Icelandic Thorn (þ); ae Digraph (æ); oe Digraph (œ); Tverdii Znak (ʺ); Turkish i (ı); British Pound (£); eth (ð).VOYAGER COLUMN 4: Dagger (DO NOT USE); o Hook (ơ); u Hook (ư); Beta β; Gamma γ; Superscript 0 (⁰); Superscript 1 (¹); Superscript 2 (²); Superscript 3 (³).VOYAGER COLUMN 5: Superscript 4 (⁴); Superscript 5 (⁵); Superscript 6 (⁶); Superscript 7 (⁷); Superscript 8 (⁸); Superscript 9 (⁹); Superscript + (⁺); Superscript - (⁻); Superscript ( (⁽).VOYAGER COLUMN 6: Superscript ) (⁾); Subscript 0 (₀); Subscript 1 (₁); Subscript 2 (₂); Subscript 3 (₃); Subscript 4 (₄); Subscript 5 (₅); Subscript 6 (₆); Subscript 7 (₇).VOYAGER COLUMN 7: Subscript 8 (₈); Subscript 9 (₉); Subscript + (₊); Subscript - (₋); Subscript ( (₍); Subscript ) (₎); Pseudo Question Mark (ỏ); Grave (ò); Acute (ó).VOYAGER COLUMN 8: Circumflex (ô); Tilde (õ); Macron (ō); Breve (ŏ); Superior Dot (ȯ); Umlaut (ö); Hacek (ǒ); Circle Above (o̊); Ligature left (o͡).VOYAGER COLUMN 9: Ligature right (o) ; High Comma off center (o̕); Double Acute (ő); Candrabindu (o̐); Cedilla (o̧); Right Hook (ǫ); Dot Below (ọ); Double Dot Below (o̤); Circle Below (o̥).VOYAGER COLUMN 10: Double Underscore (o̳); Underscore (o̲); Left Hook (o̦); Right Cedilla (o̜); Upadhmaniya (o̮); Double Tilde 1st half (o͠); Double Tilde 2nd half (o) ; High Comma centered (o̓).VOYAGER PC Keyboard: Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~).Standard PC Keyboard: 1234567890-= !@#$%^&*()_+ qwertyuiop[]\ QWERTYUIOP{}| asdfghjkl;' ASDFGHJKL:" zxcvbnm,./ ZXCVBNM<>? diff --git a/test/xml2tmarc7.xml.marc b/test/xml2tmarc7.xml.marc new file mode 100644 index 0000000..e6315df --- /dev/null +++ b/test/xml2tmarc7.xml.marc @@ -0,0 +1 @@ +03109cam a2200349 i 4500001001300000003000400013005001700017008004100034035001000075035001000085035001000095040001300105906004500118010001700163245005200180260002100232300002100253500004300274500017600317500020000493500016100693500019500854500017801049500022001227500020501447500019901652500017701851500021402028500021502242500016102457500014102618 77123332 DLC20051218154744.0981008b2001 ilu 000 0 eng  a57779 a90490 a93202 aDLCcDLC a0bundcorignewduencipf19gy-gencatlg a 77123332 00aVoyager Diacritic test -- New input 001 (SBIE). any :bny,c2001. a100 p. ;c12 cm. aNew copy imported from file (8/12/99). aVOYAGER COLUMN 0 (NEW): Degree sign (°); Phono Copyright mark (℗); Copyright mark (©); Sharp (♯); Inverted Question mark (¿); Inverted Exclamation mark (¡). aVOYAGER COLUMN 1: Script L (ℓ); Polish L (Ł); Scandanavian O (Ø); D with Crossbar (Đ); Icelandic Thorn (Þ); AE Digraph (Æ); OE Digraph (Œ); Miagkii Znak (ʹ); Dot at Midline (·). aVOYAGER COLUMN 2: Musical Flat (♭); Patent Mark (®); Plus or Minus (±); O Hook (Æ ); U Hook (Ư); Alif (ʼ); alpha α; Ayn (Ê»); Polish l (ł). aVOYAGER COLUMN 3: Scandanavian o (ø); d with crossbar (đ); Icelandic Thorn (þ); ae Digraph (æ); oe Digraph (œ); Tverdii Znak (ʺ); Turkish i (ı); British Pound (£); eth (ð). aVOYAGER COLUMN 4: Dagger (DO NOT USE); o Hook (Æ¡); u Hook (Æ°); Beta β; Gamma γ; Superscript 0 (⁰); Superscript 1 (¹); Superscript 2 (²); Superscript 3 (³). aVOYAGER COLUMN 5: Superscript 4 (⁴); Superscript 5 (⁵); Superscript 6 (⁶); Superscript 7 (⁷); Superscript 8 (⁸); Superscript 9 (⁹); Superscript + (⁺); Superscript - (⁻); Superscript ( (⁽). aVOYAGER COLUMN 6: Superscript ) (⁾); Subscript 0 (₀); Subscript 1 (₁); Subscript 2 (₂); Subscript 3 (₃); Subscript 4 (₄); Subscript 5 (₅); Subscript 6 (₆); Subscript 7 (₇). aVOYAGER COLUMN 7: Subscript 8 (₈); Subscript 9 (₉); Subscript + (₊); Subscript - (₋); Subscript ( (₍); Subscript ) (₎); Pseudo Question Mark (ỏ); Grave (ò); Acute (ó). aVOYAGER COLUMN 8: Circumflex (ô); Tilde (õ); Macron (ō); Breve (ŏ); Superior Dot (ȯ); Umlaut (ö); Hacek (ǒ); Circle Above (o̊); Ligature left (oÍ¡). aVOYAGER COLUMN 9: Ligature right (o) ; High Comma off center (o̕); Double Acute (ő); Candrabindu (o̐); Cedilla (o̧); Right Hook (ǫ); Dot Below (oÌ£); Double Dot Below (o̤); Circle Below (oÌ¥). aVOYAGER COLUMN 10: Double Underscore (o̳); Underscore (o̲); Left Hook (o̦); Right Cedilla (o̜); Upadhmaniya (oÌ®); Double Tilde 1st half (oÍ ); Double Tilde 2nd half (o) ; High Comma centered (o̓). aVOYAGER PC Keyboard: Spacing Circumflex (^); Spacing Underscore (_); Spacing Grave (`); Open Curly Bracket ({); Close Curly Bracket (}); Spacing Tilde (~). aStandard PC Keyboard: 1234567890-= !@#$%^&*()_+ qwertyuiop[]\ QWERTYUIOP{}| asdfghjkl;' ASDFGHJKL:" zxcvbnm,./ ZXCVBNM<>? \ No newline at end of file diff --git a/test/xml2tmarc8.xml b/test/xml2tmarc8.xml new file mode 100644 index 0000000..8dc0550 --- /dev/null +++ b/test/xml2tmarc8.xml @@ -0,0 +1,2 @@ + +02647nam^a2200469^^^4500UCD-00259230120061209034435.0m d cr bn |||a|bb|920330s1583 enk s 000 0 eng d99851339eoCL0036000039ProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106Cu-RivESCu-RivESCStRLINdcrbWaOLNClinton, Atkinson.Clinton, Purser & Arnold, to their countreymen wheresoeuer[electronic resource] :Wherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, & their duetiful minds towardes her most excellent MaiestieClinton, Purser & Arnold, to their countreymen wheresoeverClinton, Purser & Arnold, to their countreymen wheresoeverLondon :Imprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church,[1583?][12] pIn verseThe first poem is signed: Thomas Walton alias PurserClinton's full name and bookseller's name from, and publication date conjectured by, STCSignatures: A⁴ B²Reproduction of the original in the Bodleian LibrarySTC (2nd ed.)5431Also issued in print and on microformElectronic reproduction.Mode of access: World Wide Web.Restricted to UC campusesElectronic texts.localPiratesEnglandEarly works to 1800.Walton, Thomas,fl. 1583.autArnold,fl. 1583.autEarly English books onlineMERkmainSCBnnetRestricted to UC campusesSCP UCSDhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610Restricted to UC campusesSCP UCSDhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610DVXLELECT-GENInternetLAGEinOnline accessRestricted to UC campusesSCP UCSDhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610Restricted to UC campuseshttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610CDLEarly English books, 1475-1640 ;1406:13.DVXL002592301 diff --git a/test/xml2tmarc8.xml.marc b/test/xml2tmarc8.xml.marc new file mode 100644 index 0000000..7a433b0 --- /dev/null +++ b/test/xml2tmarc8.xml.marc @@ -0,0 +1 @@ +02643nam^a2200469^^^4500001001400000005001700014006001900031007001500050008004100065035001500106037009000121040004500211100002300256245028100279246006300560246006300623260014400686300001100830500001300841500005700854500009300911500002501004500005701029510002401086530004201110533008901152655002901241650004301270700003601313700002801349793003101377852001501408852001401423856015401437856015401591852003001745852002801775856015401803856014901957830004702106901002002153UCD-00259230120061209034435.0m d cr bn |||a|bb|920330s1583 enk s 000 0 eng d a99851339eo aCL0036000039bProQuest Information and Learning. 300 N. Zeeb Rd., Ann Arbor, MI 48106 aCu-RivEScCu-RivESdCStRLINedcrbdWaOLN1 aClinton, Atkinson.00aClinton, Purser & Arnold, to their countreymen wheresoeuerh[electronic resource] :bWherein is described by their own hands their vnfeigned penitence for their offences past: their patience in welcoming their death, & their duetiful minds towardes her most excellent Maiestie2 aClinton, Purser & Arnold, to their countreymen wheresoever2 aClinton, Purser & Arnold, to their countreymen wheresoever aLondon :bImprinted by Iohn Wolfe and are to be sold [by W. Wright] at the middle shop in the Poultry, ioyning S. Mildreds Church,c[1583?] a[12] p aIn verse aThe first poem is signed: Thomas Walton alias Purser aClinton's full name and bookseller's name from, and publication date conjectured by, STC aSignatures: A⁴ B² aReproduction of the original in the Bodleian Library4 aSTC (2nd ed.)c5431 aAlso issued in print and on microform aElectronic reproduction.nMode of access: World Wide Web.nRestricted to UC campuses 7aElectronic texts.2local 0aPirateszEnglandvEarly works to 1800.1 aWalton, Thomas,dfl. 1583.4aut1 aArnold,dfl. 1583.4aut0 aEarly English books online aMERbkmain aSCBbnnet40zRestricted to UC campusesxSCP UCSDuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:1661040zRestricted to UC campusesxSCP UCSDuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610 aDVXLbELECT-GENhInternet aLAGEbin3Online access40zRestricted to UC campusesxSCP UCSDuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:1661040zRestricted to UC campusesuhttp://gateway.proquest.com/openurl?ctx_ver=Z39.88-2003&res_id=xri:eebo&rft_val_fmt=&rft_id=xri:eebo:image:16610xCDL 0aEarly English books, 1475-1640 ;v1406:13. aDVXLb002592301 \ No newline at end of file diff --git a/test/xml2tmarc9.xml b/test/xml2tmarc9.xml new file mode 100644 index 0000000..a93e026 --- /dev/null +++ b/test/xml2tmarc9.xml @@ -0,0 +1,2 @@ + +02075cas a22005055a 4500 2005336282DLC20070911033614.0070910c20059999mr uu p f0 0ara 2005336282-3-7-0709110002-p----- (OCoLC)1704901647undserialsuncip19n-oclcsercDLCDLCDLCarafrelcf-mr---IN PROCESS(3880-01Qaḍāʼ al-usrah :majallah mutakhaṣṣiṣah /Wizārat al-ʻAdl.Justice de la famille880-02Majallat Qaḍāʼ al-usrah<2006>880-03al-Rabāṭ :Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah,2005-v. :ill. ;24 cm.Irregular (semiannual)880-04al-ʻAdad 1. (Yūlyūz 2005)-880-05Manshūrāt Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-QaḍāʼīyahSome issues have also a distinctive title.Latest issue consulted: al-ʻAdad 3. (Dujanbir 2006).Chiefly in Arabic; some French.Domestic relations (Islamic law)Morocco.Divorce (Islamic law)Marriage lawMorocco.Law reports, digests, etc.Morocco.880-06Jamʻīyat Nashr al-Maʻlūmah al-Qānūnīyah wa-al-Qaḍāʼīyah.880-07Morocco.Wizārat al-ʻAdl.DLC245-01/(3/rقضاء الأسرة :مجلة متخصصة /وزارة العدل.246-02/(3/rمجلة قضاء الأسرة<2006>260-03/(3/rالرباط :جمعية نشر المعلومة القانونية والقضائية،2005-362-04/(3/rالعدد 1. (يوليوز 2005)-490-05/(3/rمنشورات جمعية نشر المعلومة القانونية والقضائية710-06/(3/rجمعية نشر المعلومة القانونية والقضائية.710-07/(3/rMorocco.وزارة العدل.LC Cairo Office [we 45] diff --git a/test/xml2tmarc9.xml.marc b/test/xml2tmarc9.xml.marc new file mode 100644 index 0000000..9880e30 --- /dev/null +++ b/test/xml2tmarc9.xml.marc @@ -0,0 +1 @@ +02244cas a22005055a 4500001001300000003000400013005001700017008004100034010001700075012003100092035002100123906004500144040001800189041001300207042000700220043001200227050001500239066000700254245008700261246002600348246004900374260011100423300002500534310002700559362004400586490010100630500004700731500005800778546003600836650004700872650002600919650002700945650004100972710008801013710004201101850000801143880009001151880005601241880011501297880005201412880010501464880009101569880005001660936002801710 2005336282DLC20070911033614.0070910c20059999mr uu p f0 0ara  a 2005336282 a-3-7-0709110002-p-----  a(OCoLC)170490164 a7bundcserialsduencipf19gn-oclcserc aDLCcDLCdDLC0 aaraafre alc af-mr---00aIN PROCESS c(3006880-01aQadÌ£āʼ al-usrah :bmajallah mutakhasÌ£sÌ£isÌ£ah /cWizārat al-Ê»Adl.13aJustice de la famille136880-02aMajallat QadÌ£āʼ al-usrahf<2006> 6880-03aal-RabātÌ£ :bJamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah,c2005- av. :bill. ;c24 cm. aIrregular (semiannual)0 6880-04aal-Ê»Adad 1. (Yūlyūz 2005)-0 6880-05aManshūrāt JamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah aSome issues have also a distinctive title. aLatest issue consulted: al-Ê»Adad 3. (Dujanbir 2006). aChiefly in Arabic; some French. 0aDomestic relations (Islamic law)zMorocco. 0aDivorce (Islamic law) 0aMarriage lawzMorocco. 0aLaw reports, digests, etc.zMorocco.2 6880-06aJamÊ»īyat Nashr al-MaÊ»lūmah al-Qānūnīyah wa-al-QadÌ£āʼīyah.1 6880-07aMorocco.bWizārat al-Ê»Adl. aDLC006245-01/(3/raقضاء الأسرة :bمجلة متخصصة /cوزارة العدل.136246-02/(3/raمجلة قضاء الأسرةf<2006> 6260-03/(3/raالرباط :bجمعية نشر المعلومة القانونية والقضائية،c2005-0 6362-04/(3/raالعدد 1. (يوليوز 2005)-0 6490-05/(3/raمنشورات جمعية نشر المعلومة القانونية والقضائية2 6710-06/(3/raجمعية نشر المعلومة القانونية والقضائية.1 6710-07/(3/raMorocco.bوزارة العدل. aLC Cairo Office [we 45] \ No newline at end of file diff --git a/util/marcdump.c b/util/marcdump.c index d9732be..edacc07 100644 --- a/util/marcdump.c +++ b/util/marcdump.c @@ -133,7 +133,7 @@ static void marcdump_read_xml(yaz_marc_t mt, const char *fname) { const char *name = (const char *) xmlTextReaderLocalName(reader); - if (!strcmp(name, "record")) + if (!strcmp(name, "record") || !strcmp(name, "r")) { xmlNodePtr ptr = xmlTextReaderExpand(reader); @@ -142,7 +142,9 @@ static void marcdump_read_xml(yaz_marc_t mt, const char *fname) fprintf(stderr, "yaz_marc_read_xml failed\n"); else { - yaz_marc_write_mode(mt, wrbuf); + int write_rc = yaz_marc_write_mode(mt, wrbuf); + if (write_rc) + yaz_log(YLOG_WARN, "yaz_marc_write_mode: write error: %d", write_rc); fputs(wrbuf_cstr(wrbuf), stdout); wrbuf_rewind(wrbuf); @@ -165,7 +167,8 @@ static void marcdump_read_xml(yaz_marc_t mt, const char *fname) ptr = ptr->children; continue; } - if (!strcmp((const char *) ptr->name, "record")) + if (!strcmp((const char *) ptr->name, "record") || + !strcmp((const char *) ptr->name, "r")) { int r = yaz_marc_read_xml(mt, ptr); if (r) @@ -215,12 +218,13 @@ static void dump(const char *fname, const char *from, const char *to, } yaz_marc_iconv(mt, cd); } - yaz_marc_xml(mt, output_format); yaz_marc_enable_collection(mt); + yaz_marc_set_read_format(mt, input_format); + yaz_marc_set_write_format(mt, output_format); yaz_marc_write_using_libxml2(mt, write_using_libxml2); yaz_marc_debug(mt, verbose); - if (input_format == YAZ_MARC_MARCXML || input_format == YAZ_MARC_XCHANGE) + if (input_format == YAZ_MARC_MARCXML || input_format == YAZ_MARC_TMARCXML || input_format == YAZ_MARC_XCHANGE) { #if YAZ_HAVE_XML2 marcdump_read_xml(mt, fname);