+ZOOM_record_get now renders OPAC records when type=xml. Previously
+only the bibliographic record was rendered. For type=opac, an OPAC
+record is only returned if it is present.
+
--- 3.0.45 2009/03/31
Fixed bug #2709: TCP connect returns Invalid argument.
MARCXML
</ulink>
(converted from ISO2709 to MARCXML by YAZ).
- GRS-1 and OPAC records are not supported for this form.
+ OPAC records are also converted to XML and the
+ bibliographic record is converted to MARCXML (when possible).
+ GRS-1 records are not supported for this form.
Upon completion, the XML buffer is returned
(type <literal>const char *</literal>) and length is stored in
<literal>*len</literal>.
</para></listitem>
</varlistentry>
<varlistentry><term><literal>opac</literal></term>
- <listitem><para>OPAC for record is returned in XML.
+ <listitem><para>OPAC information for record is returned in XML
+ if an OPAC record is present at the position given. If no
+ OPAC record is present, a NULL pointer is returned.
</para></listitem>
</varlistentry>
</variablelist>
{
return return_record(rec, len, npr, YAZ_MARC_ISO2709, charset);
}
- else if (!strcmp (type, "ext"))
+ else if (!strcmp(type, "ext"))
{
if (len) *len = -1;
return (const char *) npr->u.databaseRecord;
}
- else if (!strcmp (type, "opac"))
+ else if (!strcmp(type, "opac"))
{
- return return_record(rec, len, npr, YAZ_MARC_MARCXML, charset);
+ if (npr->u.databaseRecord->which == Z_External_OPAC)
+ return return_record(rec, len, npr, YAZ_MARC_MARCXML, charset);
}
return 0;
}