Issues with my SFX in HIP code

Specifically with the stuff that generates the coverage strings missing from the SFX API. In some cases of SFX including services from ‘related’ SFX objects, my current code will generate empty or incorrect coverage strings that do not match what the SFX menu itself provides.

I am trying to come up with a very hacky workaround to this. If you want the new version, contact me in a couple days (I should REALLY put this stuff in a publically available SVN). But a VERY hacky workaround is what it will have to be, and will probably still have some edge cases it can not deal correctly with. To explain what the deal is… it’s confusing to explain, but I’ll just give you my Ex Libris enhancement request:

I have an enhancment request for the SFX XML menu (sfx.response_type=simplexml). It probably applies to the other xml response type as well, but I don’t use that currently.

In the <target> section of the XML, where there is one <target> for every target service given—my request is to add an rft.object_id element, with the SFX object ID that generated that target service.

One might initially think this is unneccesary, becuase there is only one SFX object ID that applies to the entire menu, including ALL target (services) contained in the XML. And this single overall objectID is given elsewhere.

However, this assumption is not true in the case of @sfx.related_objects issues. There can sometimes be the same target_service listed TWICE on a page (and in the XML), with identical target service IDs, but really one represents the main SFX object ID, and the other(s) represents other related object IDs.
An example:
http://tinyurl.com/2mp4nw

The fact that they are both listed in the XML, with no easy way to distinguish them is causing difficulties for my client code. For instance, I have written code to generate the human-readable coverage string (eg, “From September 1999”), which is missing from the API. The fact that my code can’t know for sure which object ID goes with which target service makes it difficult/impossible for my code to look up the correct coverage string from the database.

Thus my enhancement request. To each <target> block, add a <object_id> element containing the SFX object ID that actually generated that target service. In most cases, it will be the same as the rft.object_id contained elsewhere on the XML. But in cases of services included due to related objects, it will be different and match that related object ID.

This entry was posted in catalogs, HIP, Link Resolvers, Practice. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s