Tech Blog

Alternate Formats for Linked Data in Alma

As we’ve discussed previously, the Linked Data features in Alma now allow bibliographic records to be retrieved in three different formats- BIBFRAME, RDA/RDF and JSON-LD. In addition, staff users can view records in BIBFRAME directly from the record view:

For some linked data experts, these formats may be perfectly readable as-is. But they were intended to be consumed by computer systems and are therefore less human-readable. However, there are other linked data presentations that are perhaps more appropriate for human consumption, and it’s possible to use common tools to display the records in these alternative presentation formats.

A Word About RDF and N3

There are plenty of resources on the Internet which can do a much better job of introducing RDF than I could. For our purposes, we’ll just recall that RDF, or Resource Description Framework, intends to make statements about entities or resources. These statements take the form of triples, or subject-predicate-object. For example, a certain work (the subject) has a title (the predicate) of “The Complete Works of Dr. Suess” (the object).


The Notation3 (or “N3”) format, is a more compact and (some might say) easier-to-read format than RDF XML. Turtle syntax is a subset of N3. This syntax shows the subject on a single line followed by lines which show the predicate and object pairs. This can be represented as follows:

  predicate object

Or as the example in Wikipedia shows:

@prefix dc: <>.

  dc:title "Tony Benn";
  dc:publisher "Wikipedia".

RDF XML in Alma

Alma provides the BIBFRAME and RDA/RDF linked data formats in RDF XML, which is verbose and not so manageable.

<rdf:RDF xmlns:madsrdf=""
<rdac:Work rdf:about="">
<rdaw:titleOfTheWork>Harry Potter and the prisoner of Azkaban /</rdaw:titleOfTheWork>
<rdaw:SubjectRelationshipOf rdf:resource=""/>
<rdaw:SubjectRelationshipOf>England Fiction.</rdaw:SubjectRelationshipOf>
<rdaw:creator rdf:resource=""/>
<rdaw:creator rdf:resource=""/>
<rdaw:SubjectRelationshipOf>Schools Fiction.</rdaw:SubjectRelationshipOf>
<rdaw:SubjectRelationshipOf>Magic Fiction.</rdaw:SubjectRelationshipOf>
<rdaw:SubjectRelationshipOf>Wizards Fiction.</rdaw:SubjectRelationshipOf>
<rdaw:SubjectRelationshipOf rdf:resource=""/>
<rdaw:SubjectRelationshipOf rdf:resource=""/>
<rdaw:SubjectRelationshipOf rdf:resource=""/>
<rdaw:SubjectRelationshipOf rdf:resource=""/>
<rdaw:manifestationOfWork rdf:resource=""/>
<rdaw:manifestationOfWork rdf:resource=""/>

But we can use a tool such as the RDF Translator (powered by RDFLib) to translate the XML into the more readable N3 format. The RDF translator offers a web interface which accepts a URI or the XML body:

If we paste the response body of the Alma RDA/RDF Work API for a record in our repository, we receive the following output:

@prefix rdac: <> .
@prefix rdam: <> .
@prefix rdaw: <> .
@prefix rdf: <> .

<> a rdac:Work ;
    rdaw:SubjectRelationshipOf "England Fiction.",
        "England Juvenile fiction.",
        "Hogwarts School of Witchcraft and Wizardry (Imaginary place) Juvenile fiction.",
        "Magic Fiction.",
        "Magic Juvenile fiction.",
        "Schools Fiction.",
        "Schools Juvenile fiction.",
        "Wizards Fiction.",
        "Wizards Juvenile fiction." ;
    rdaw:creator "Rowling, J. K." ;
    rdaw:manifestationOfWork <>,
        <> ;
    rdaw:titleOfTheWork "Harry Potter and the prisoner of Azkaban /" .

This is of course just the beginning. The translator supports other formats and can be executed programmatically.

We’d love to hear about your experience with Linked Data in Ex Libris projects. Sound off in the comments or the forum.



Turtle image available under CC BY-SA 3.0

Leave a Reply