Ready to Learn?Ex Libris products all provide open APIs

Introduction to Aleph X-Services

What is the X-Server?

The X-Server is a component of Ex Libris products' multi-tier architectural structure. It enables connectivity to the Aleph system, as well as to the MetaLib and DigiTool systems via a standard XML interface.

The Ex Libris Products multi-tier applications described in Figure 1 can be divided into the following layers:

  1. The Data Logic and Services layer interacts with the database and provides data to the higher levels. This layer is comprised of the RDBMS component, which handles physical access to the database and the I/O engine, which allows communication between the application layer and the actual data.
  2. The Application Logic layer provides functional services to the Presentation Logic layer, based on the data it accesses via the Data Logic and Services layer. It is comprised of the Application Atomic Services component, which provides basic services, and the X-Server layer. The X-Server layer provides compound services based on the accumulation of several independent services into a comprehensive functional operation or request for information.

Figure 1: Ex Libris Products' multi-tier architecture

Ex Libris Products' multi-tier architecture

The X-Server component has the following advantages:

  1. The X-Server enables Ex Libris products to be fully accessible to other systems. The interaction with the X-Server is via URL syntax for input and XML for output, thereby providing for a standard, simple interface.
    This is illustrated in Figure 2.
  2. The services provided by the X-Server are comprehensive, compound services that provide simple and straightforward interaction with the Ex Libris systems. Knowledge of the system's internal format, protocols, and structure is not required.
  3. The X-Server enables the Presentation Logic components of Ex Libris products to be independent of the Application Logic. The Presentation Logic only handles the interaction with the user and the presentation of data.

Figure 2: Interaction with the X-Server

Figure 2: Interaction with the X-Server

 

The X-Server receives input in the form of a standard URL syntax and replies in XML.

Example of Query

The process has two parts: invoking the query and obtaining the results.

Invoking a Query

An HTTP request: find all documents with Author=Smith in database USM01:
http://aleph.net/X?op=find&base=usm01&request=wau=smith
The X-Server receives the request and returns an XML reply, which is sent to the calling component:

The X-Server receives the request and returns an XML reply, which is sent to the calling component:

 
<?xml version ="1.0" encoding ="UTF-8"?>
  <find>
    <set_number>000003</set_number>
    <no_records>000000178</no_records>
    <no_entries>000000178</no_entries>
    <session-id>7ASI36K2H1SYCB6F9APH84K7NCQTPGL4QTTL73NP1928EFFX3H</session-id>
</find>

 

Obtaining (presenting) the Results

The calling component requests the two results from the specified set (11 and 32), in MARC format:

http://aleph.net/X?op=present&set_no=000003&set_entry=000000011,000000032&format=marc
The X-Server returns an XML file:

<?xml version ="1.0" encoding ="UTF-8"?>
  <present>
    <record>
    <record_header>
      <set_entry>000000011</set_entry>
    </record_header>
    <doc_number>000047869</doc_number>
    <metadata>
    <oai_marc>
      <fixfield id="FMT">BK</fixfield>
      <fixfield id="LDR">00505nam^^2200169K^^4500</fixfield>
      ...

      <varfield id="100"i1="1"i2=" ">
          <subfield label="a">Smith, Edmund Banks.</subfield>
      </varfield>
      <varfield id="245"i1="1"i2="0">
          <subfield label="a">Address delivered before the Assembly excise committee, Albany, March 25th, 1908.</subfield>
      </varfield>
      <varfield id="260"i1=" "i2=" ">
          <subfield label="a">[n.p.,</subfield>
          <subfield label="c">1908]</subfield>
      </varfield>
      <varfield id="500"i1=" "i2=" ">
          <subfield label="a">On the subject of temperance.</subfield>
      </varfield>
      ...

      </oai_marc>
      </metadata>
      </record>
      <record>
      <record_header>
      <set_entry>000000032</set_entry>
      </record_header>
      <doc_number>000044941</doc_number>
      <metadata>
      <oai_marc>
      <fixfield id="FMT">BK</fixfield>
      <fixfield id="LDR">00855cam^^2200265Ia^4500</fixfield>
      ...

      <varfield id="100"i1="1"i2=" ">
          <subfield label="a">Smith, Samuel Calvin,</subfield>
          <subfield label="d">1881-1939.</subfield>
      </varfield>
      <varfield id="245"i1="1"i2="0">
          <subfield label="a">That heart of yours /</subfield>
          <subfield label="c">by S. Calvin Smith.</subfield>
      </varfield>
      ...

      </oai_marc>
      </metadata>
      </record>
      <session-id>CYUXJ2KB2H7G67GPS2RK5BQJDCY6E7AR37SYCEFSQEKT84G3LT</session-id>
</present>

 

X-Service Error Messages

General

There are two main error tables containing general error messages that are used by every X-Service. These tables are located in the ./alephe/error_lng directory:

  • www_x_global
  • xml_global

Errors related to problems with input parameters sent by the user are usually located under www_x_global, while errors relating to the validity of these parameters are located under xml_service (for example, 0071 Library $1 is not defined on the server.)
The reason for this distinction is that error messages are produced from two different sources:

  1. Accepting input parameters and checking if there is a missing parameter. This stage is done in www_x, and its error messages are presented under www_x_global.
  2. Working on the input and performing the actions defined in the X-Service. This stage is done in xml_service, and its error messages are presented under xml_global.

Specific Error Tables

Every X-Service can have specific error tables with its own unique error messages. Their location is the same as the main error table (./alephe/error_eng), and the names are as follows (in this example, for the bor-auth X-Service):

  • www_x_bor_auth
  • xml_bor_auth
    www_x_bor_auth includes specific error messages for accepting the X-Service parameters.
    xml_bor_auth includes specific error messages for the main function of the X-Service.

For example, if the record of the global record of a given patron record cannot be found, the following message is displayed in xml_bor_auth:

0022 Error retrieving Global Patron Record

because bor_id was given by the user, and www_x_bor_auth will not generate any error message, since the parameter was given. The xml_bor_auth will check if this parameter is valid, and accordingly will generate appropriate error message.

Note:
If there is a message in a private error table with the same number as in the global table (for example both www_x_global and www_x_bor_auth have a message 81, or both xml_global and xml_bor_auth have a message 11), then the private error table's message overrides the global message.

Examples:

  1. The get-sort-codes X-Service requires a library as an input. If no library is entered, message 81 is called (from www_x_global):
    http://aleph.net/X?op=get-sort-codes
    The output XML is:
    <?xml version ="1.0" encoding ="UTF-8"?>
      <get-sort-codes>
          <session-id>EQEYMBEXYYCV7D6SKR7TNSQ46KD7M69NGAQL1YDARKMMYFL13K</session-id>
          <error>Library must be included in service params.</error>
    </get-sort-codes>
    
    
  2. The Find X-Service requires a request as an input.
    Since the need for a request number is specific to this X-Service, it uses error message 11 from its local error message table (www_x_find) if a request has not been given:
    http://aleph.net/X?op=find&base=usm01&code=wti&adjacent=Y
    The output XML is:
<?xml version ="1.0" encoding ="UTF-8"?>
  <find>
      <session-id>558A97B57QH1BUCGBFHHCBGNBRE1JM1Q9A3P5AU1KBXSCISM59</session-id>
      <error>Request must be filled</error>
</find>

    If message 11 does not exist in www_x_find, the following message is displayed:

<?xml version="1.0" encoding ="UTF-8"?>
  <find>
      <session-id>TX18YV15ATT8S17HN43C4HHD8CV2G9RS4UJVAGXLJSXE5D5YD9</session-id>
      <error>Error 11 Not defined for service www_x_find.</error>
</find>

X-Service Licenses

The license check checks whether or not there is a license to use an X-Service. It is based on license files, located in the ./alephe/tab directory. The check does not look for a specific user permission, but for a general license to use the x-service.

X-Service Permissions

The Staff Privileges function applies also to the X-Services.
In general, staff members can be restricted to use only specific X-Services for their specific needs. There is a list of permissions for X-Services per user name and user password for a given library.
The "user_name" and "user_password" parameters can be sent in the URL.
For example:
http://aleph.net/X/?op=find&base=usm01&request=wau=smith&user_name=CAT-ITEM&user_password=CAT-ITEM

If the user does not have permission to use a specific x-service, thenthe check permission procedure fails and the X-Service is not activated. An error message, such as the following one, is displayed:

<?xml version ="1.0" encoding ="UTF-8"?>
  <login>
      <error>User CAT-ITEM denied permission for function 'WWW-X/MAIN' in library USR00.</error>
</login>

Note:
If no user name and password are given when activating the x-service, the default for both is: WWW-X.

X-Service Translate Mechanism

General Purpose

For every X-Service there is an option to use the translate mechanism. This mechanism, in general, is the same as the printing translate mechanism.
The translate mechanism is active, unless the "translate" parameter is inserted and the value specified to be N (&translate=N).

There are two levels of translation:

  • .tag : Filtering per structure and associated tag names. You can delete an entire set of tags from the XML output of the X-Service. You can also change the output tag names in this XML.
  • .trn : Changing the content of the XML (data), for example, presentation of date fields to be formatted to a standard date presentation.

Tables

There are two types of translate tables, located at ./alephe/www_x_lng:

  • global.trn / global.tag - These are global tables, referring to all X-Services.
  • xxx.trn / xxx.tag - The xxx is the name of the X-Service. This type of table is not mandatory, although it is recommended to create these tables in case a specific translation is needed for an X-Service.

    Example of the Use of a .tag File

The following are the results when searching for the item (Z30) and Loan (Z36) records for a specific document and using the item-data X-Service_._

http://aleph.net/X?op=item-data&doc_number=000040112&base=usm01

The results can be seen after the translation takes place, because of the 'item-data.tag' translation table.

<?xml version = "1.0" encoding = "UTF-8"?>
<item-data>
    <item>
        <item-record-key>000040112000010</item-record-key>
        <item-bar-code>32044040016594</item-bar-code>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1990</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>Y</requested>
        <expected>N</expected>
        <loan-status>A</loan-status>
        <loan-in-transit>N</loan-in-transit>
        <loan-due-date>20150616</loan-due-date>
        <loan-due-hour>1000</loan-due-hour>
    </item>
    <item>
        <item-record-key>000040112000020</item-record-key>
        <item-bar-code>32044047288493</item-bar-code>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1991</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>N</requested>
        <expected>N</expected>
    </item>
    <item>
        <item-record-key>000040112000030</item-record-key>
        <item-bar-code>32044039993605</item-bar-code>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1992</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>N</requested>
        <expected>N</expected>
    </item>
    <item>
        <item-record-key>000040112000040</item-record-key>
        <item-bar-code>32044059872044</item-bar-code>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>02</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1997</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>N</requested>
        <expected>N</expected>
    </item>
    <session-id>Q5V67JTPKDH4FRBMC9UYPU9V5MBTQI3YABKPEBU7MIRRICH59C</session-id>
</item-data>

The "z13-" text was removed from the tags by using the ill-get-doc-short.tag file:

The name of the "rec-key" and "barcode" tag is changed by 'item-data.tag' to: "item-record-key" and "item-bar-code".

!Tag                                Type       Parameters
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-!!!!!!!!!!-!!!!!!!!!!!!!!!!!!!!->
barcode                             TRANSLATE  item-bar-code
rec-key                             TRANSLATE  item-record-key
                                                      

Here are the results when no tag translation table exists:

http://aleph.net/X?op=item-data&doc_number=000040112&base=usm01

The URL is the same, but there are no item-data.tag translate tables located at ./alephe/www_x_lng.
Therefore the original '"rec-key" and "barcode" tags are not changed.

<?xml version = "1.0" encoding = "UTF-8"?>
<item-data>
    <item>
        <rec-key>000040112000010</rec-key>
        <barcode>32044040016594</barcode>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1990</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>Y</requested>
        <expected>N</expected>
        <loan-status>A</loan-status>
        <loan-in-transit>N</loan-in-transit>
        <loan-due-date>20150616</loan-due-date>
        <loan-due-hour>1000</loan-due-hour>
    </item>
    <item>
        <rec-key>000040112000020</rec-key>
        <barcode>32044047288493</barcode>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1991</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>N</requested>
        <expected>N</expected>
    </item>
    <item>
        <rec-key>000040112000030</rec-key>
        <barcode>32044039993605</barcode>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1992</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>N</requested>
        <expected>N</expected>
    </item>
    <item>
        <rec-key>000040112000040</rec-key>
        <barcode>32044059872044</barcode>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>02</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1997</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>N</requested>
        <expected>N</expected>
    </item>
    <session-id>AYD8RR1RS1XT9CS1KP9VA2DHH2QV5522PGDNYCUB2EP5EH2CJ7</session-id>
</item-data>

Available .tag File Functions

The following .tag file functions may be used for manipulating X-Service outputs:

  • TRANSLATE - Changes the tag name to the name that is defined in column 3.
  • DELETE - Removes the tag from output XML.
  • DUPLICATE - Duplicates a tag with the tag names that are set up in column 3. For example:

        z303-home-library                   DUPLICATE  home-library home-library-text

        This setup will create the tags home-library and home-library-text in the output XML, instead of the original z303-home-library

        This function is available from version 20.1.

Example of the Use of a .trn File

The following are the results when searching for the item (Z30) and Loan (Z36) records for a specific document and using the item-data X-Service.

http://aleph.net/X?op=item-data&doc_number=000040112&base=usm01

The results can be seen after the translation of the values takes place (since no "&translate=N" option is specified):

<?xml version = "1.0" encoding = "UTF-8"?>
<item-data>
    <item>
        <item-record-key>000040112000010</item-record-key>
        <item-bar-code>32044040016594</item-bar-code>
        <sub-library>Medicine Library</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1990</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>Not on Hold</on-hold>
        <requested>Requested Plese Notice</requested>
        <expected>Not Expected</expected>
        <loan-status>Active LOAN</loan-status>
        <loan-in-transit>No LoanTransit</loan-in-transit>
        <loan-due-date>20150616</loan-due-date>
        <loan-due-hour>1000</loan-due-hour>
    </item>
    <item>
        <item-record-key>000040112000020</item-record-key>
        <item-bar-code>32044047288493</item-bar-code>
        <sub-library>Medicine Library</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1991</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>Not on Hold</on-hold>
        <requested>No Request</requested>
        <expected>Not Expected</expected>
    </item>
    <item>
        <item-record-key>000040112000030</item-record-key>
        <item-bar-code>32044039993605</item-bar-code>
        <sub-library>Medicine Library</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1992</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>Not on Hold</on-hold>
        <requested>No Request</requested>
        <expected>Not Expected</expected>
    </item>
    <item>
        <item-record-key>000040112000040</item-record-key>
        <item-bar-code>32044059872044</item-bar-code>
        <sub-library>Medicine Library</sub-library>
        <collection>GEN</collection>
        <item-status>02</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1997</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>Not on Hold</on-hold>
        <requested>No Request</requested>
        <expected>Not Expected</expected>
    </item>
    <session-id>AG3D7V6QP7479NVCCVYCNFD5FXUCF1R2PL9BPNMPPREXCPY354</session-id>
</item-data>

The following are the results when the "no translation" (&translate=N) option is specified:

http://aleph.net/X?op=item-data&doc_number=000040112&base=usm01&translate=N

<?xml version = "1.0" encoding = "UTF-8"?>
<item-data>
    <item>
        <item-record-key>000040112000010</item-record-key>
        <item-bar-code>32044040016594</item-bar-code>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1990</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>Y</requested>
        <expected>N</expected>
        <loan-status>A</loan-status>
        <loan-in-transit>N</loan-in-transit>
        <loan-due-date>20150616</loan-due-date>
        <loan-due-hour>1000</loan-due-hour>
    </item>
    <item>
        <item-record-key>000040112000020</item-record-key>
        <item-bar-code>32044047288493</item-bar-code>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1991</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>N</requested>
        <expected>N</expected>
    </item>
    <item>
        <item-record-key>000040112000030</item-record-key>
        <item-bar-code>32044039993605</item-bar-code>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>28</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1992</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>N</requested>
        <expected>N</expected>
    </item>
    <item>
        <item-record-key>000040112000040</item-record-key>
        <item-bar-code>32044059872044</item-bar-code>
        <sub-library>MED</sub-library>
        <collection>GEN</collection>
        <item-status>02</item-status>
        <note></note>
        <call-no-1>$$hQZ 200.3$$iA615$$mLatest in Ref.9</call-no-1>
        <call-no-2></call-no-2>
        <description>1973-1997</description>
        <chronological-i></chronological-i>
        <chronological-j></chronological-j>
        <chronological-k></chronological-k>
        <enumeration-a></enumeration-a>
        <enumeration-b></enumeration-b>
        <enumeration-c></enumeration-c>
        <library>USM50</library>
        <on-hold>N</on-hold>
        <requested>N</requested>
        <expected>N</expected>
    </item>
    <session-id>D8YHVV2N26G72MEFF1YSY8VQLRLABSUGSJTY4V83D6RRIT9GY9</session-id>
</item-data>

The difference can be seen in contents of the tags: 

translation in actiontranslation NOT in action (&translate=N)
<sub-library>Medicine Library</sub-library><sub-library>MED</sub-library>
<on-hold>Not on Hold</on-hold><on-hold>N</on-hold>
<requested>No Request</requested><requested>N</requested>
<expected>Not Expected</expected><expected>N</expected>

This is due to the changes in the global.trn file:

!                                              M
!                                              /
!Tag                                Type       S Parameters
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-!!!!!!!!!!-!-!!!!!!!!!!!!!!!!!!!!->
sub-libraries                       TEXT       S  =ALL
sub-library                         SUB-LIB    S

And changes in 'item-data.trn' file:

!                                              M
!                                              /
!Tag                                Type       S Parameters
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-!!!!!!!!!!-!-!!!!!!!!!!!!!!!!!!!!->
z36-status                          TEXT       M L=Lost C=Claimed_Returned A=Active
loan-status                         TEXT       M A=Active_LOAN N=Not_on_Loan
on-hold                             TEXT       M A=Active N=Not_on_Hold Y=On_HOLD
requested                           TEXT       M N=No_Request Y=Requested_Plese_Notice
expected                            TEXT       M N=Not_Expected Y=is_expected
loan-in-transit                     TEXT       M N=No_LoanTransit Y=Loan_is_in_Transit

When global.trn runs on the data - the 'sub-library' (MED) is traslated to the Sub-Library full name.
When 'item-data.trn' runs - the charachter inside 'loan-status', 'on-hold', 'requested', 'expected' and 'loan-in-transit' tags is translated according to the parameters in column 3.