MARC Field Order
General Purpose
The resource may be accessed with a GET request to retrieve a list of available MARC field order configurations.
The resource may be accessed with a POST request to sort supplied MARC records based upon the supplied MARC field order configuration. The input records may be either MARC 21 slim XML or Base64 encoded binary format. Input records are assumed to be UTF-8.
Product Version Compatibility
Voyager 9.2.0 and later.
Input Parameters
Parameter | Type | Description | Value | Default | Required |
---|---|---|---|---|---|
name | query parameter | The Voyager MARC field order configuration name | string | None | Yes, but not to retrieve a list of available MARC field order configurations. |
format | query parameter | The MARC record encoding to return | MARC21 or MARC21_BINARY | determined by input record encoding | No |
Input URL Syntax
The following is an example of a URL to retrieve the available MARC field order configurations:
http://server:port/vxws/marc-field-order">http://server:port/vxws/marc-field-order
The following is an example of a URL to apply a MARC field order configuration to a MARC record, expecting the same encoding format as the input records returned:
http://server:port/vxws/marc-field-order?name=order_tags_descending">http://server:port/vxws/marc-field-order?name=order_tags_descending
The following is an example of a URL to apply a MARC field order configuration to a MARC record, requesting a different encoding format from the input records returned:
http://server:port/vxws/marc-field-order?name=order_tags_descending&format=MARC21">http://server:port/vxws/marc-field-order?name=order_tags_descending&format=MARC21
Input XML Example
An XML document containing the MARC records to be sorted must be included in the POST request in order to apply a MARC field order configuration.
An example of an input XML document containing MARC21 slim XML records:
records> <collection> <marc:record> <marc:leader>00878cam a2200253 i 4500</marc:leader> <marc:controlfield>12356</marc:controlfield> <marc:controlfield>20110826153059.0</marc:controlfield> <marc:controlfield>760910s1975 dcu b f000 0 eng </marc:controlfield> <marc:datafield tag="092" ind1=" " ind2=" "> <marc:subfield code="a">378.73 U58L</marc:subfield> </marc:datafield> ... </marc:record> ... <collection> <records>
An example of an input XML document containing a MARC21 base64 binary record:
<records> <!-- id is optional --> <record id=”12356”>MDAyMTVjYW0gYTIyMDAwODUgaSA0NTAwMDAxMDAwNz...</record> </records>
In both uses, multiple MARC records may be supplied in the repeatable <record> element.
Output XML Format
The following is an example of output of retrieving the available MARC field order configurations:
<response> <reply-text>ok</reply-text> <reply-code>0</reply-code> <marc_field_order_configs> <marc_field_order_config> <name>configuration name</name> <description>configuration description</description> </marc_field_order_config> <marc_field_order_configs> <response>
The following is an example of a response to sorting fields in MARC21 slim XML encoding using a specified MARC field order configuration:
<response>
<reply-text>ok</reply-text>
<reply-code>0</reply-code>
<records>
<collection>
<record>
<leader>00878cam a2200253 i 4500</leader>
<controlfield tag="001">12356</controlfield>
<controlfield tag="005">20110826153059.0</controlfield>
<controlfield tag="008">760910s1975 dcu b f000 0 eng </controlfield>
<datafield tag="610" ind1="1" ind2="0">
<subfield code="a">United States.</subfield>
<subfield code="b">Office of Education</subfield>
<subfield code="x">History.</subfield>
</datafield>
...
</record>
...
</collection>
</records>
</response>
The following is an example of a response to sorting fields in MARC21 base64 binary encoding using a specified MARC field order configuration:
<response> <reply-text>ok</reply-text> <reply-code>0</reply-code> <records> <!-- id is returned if sent --> <record id=”12356”>MDAyMTVjYW0gYTIyMDAwODUgaSA0NTAwMDAxMDAwNz...</record> ... </records> </response>