Ready to Learn?Ex Libris products all provide open APIs

Tech Blog


Publishing Full text From Rosetta to Primo

Keren Fux on April 6th, 2017

In this post we will show how to publish full-text content from Rosetta to Primo that is supported from version 5.2 of Rosetta. If you are new to the publishing process, here is a great place to start:

Publishing full-text will allow searching the content of our files in Primo, improving our search capabilities immensely. The flow is described by the following diagram:

A new Viewer Pre Processor has been added to Rosetta that retrieves the full-text of a PDF file and streams it.

You will need to create a rule that uses the new viewer with the input parameter set to:fulltext=true:

 Rosetta introduces a new publishing xsl in version 5.2 that enables converting an IE to OAI format with a reference to a full-text link (using our new delivery rule) “../xsl/IEToOaiFullText_dc.xsl” : 

<xsl:stylesheet xmlns:xsl=""
    version="1.0" xmlns:dnx="">
  <xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
  <xsl:template match="/">
    <oai_dc:dc xmlns:oai_dc=""
        <xsl:if test="//dc:record">
          <xsl:copy-of select="//dc:record/*[namespace-uri()='']/." />
        <dc:identifier>http://rosettaServer:1801/delivery/DeliveryManagerServlet?fulltext=true&dps_pid=<xsl:value-of select="/mets:mets/mets:amdSec[@ID='ie-amd']/mets:techMD/mets:mdWrap/mets:xmlData/dnx:dnx/dnx:section[@id='internalIdentifier']/dnx:record[dnx:key[@id='internalIdentifierType']='PID']/dnx:key[@id='internalIdentifierValue']" />

The dc:identifier tag contains a URL to the delivery server using the parameter fulltext=true and the PID of the current IE. This will be used by Primo to retrieve the full-text content                                                                                                                                                                                                                                                                                                                                                  

Rosetta Publishing Configuration:

I will be creating a new publishing Configuration using a new set containing IEs with pdf files. I will also be using a new Metadata Format that I have created in the OAI Meta data format Code Table:

  Don't forget to update the oaiproviderconfig.xml Configuration File with the new Metadata Format. 


<oairoot xmlns=""


Now all that's left is to create the new Publishing Configuration using my new set and configure a new OAI profile with the following parameters:

XSL File= ../xsl/IEToOaiFullText_dc.xsl

Set Spec= {set_spec_name}

Metadata Format= {new_metadata_format}


 Once Sync Configuration is completed, you will be able to retrieve the published records using the oaiprovider link (e.g http://rosettaServer:1801/oaiprovider/request?verb=ListRecords&metadataPrefix=oai_dc_fulltext&set=for_demo) Make sure you have appropriate Access Rights and all your Full-Text URL's are accessible from Primo.

Primo Configuration:

Create a new full-text Splitter: First, I will add a new row to the File Splitters Mapping Table using the com.exlibris.primo.publish.platform.harvest.splitters.generic.DomXmlSplitter class


 I will now define the Rosetta splitter parameters in the "File Splitters Params" Mapping Table: AddExtensionsToExtensionsTable= FULLTEXT

ContentXpath= //record/metadata/*[local-name()=’dc’]

RootXpath= OAI-PMH

FullRecordXpath= OAI-PMH/ListRecords/record

IdentifierXpath= //record/header/identifier

StatusWhenDeleted= deleted

ExternalResourceSourceXpath= //record/metadata/*[local-name()='dc']//*[local-name()=’identifier’]


 You can use the filesplitter test utility in the Back Office in order to test your new splitter using an OAI fulltext record example from your Rosetta oaiprovider url. I tested my splitter with this oai record: 

<OAI-PMH xmlns="" xmlns:xsi="" xsi:schemaLocation="">
  <request verb="ListRecords" metadataPrefix="epicur"></request>
        <oai_dc:dc xsi:schemaLocation="" xmlns:oai_dc="" xmlns:dnx="" xmlns:xsi="" xmlns:dcterms="" xmlns:mets="" xmlns:dc="">
          <record xmlns="">


As you can see, the Param Values in my Splitter match the structure of the published IE from Rosetta. Changing the Rosetta xsl will of course require modifying these fields. Next, I will create a new Data source For Rosetta and attach it to my new splitter. Please note that the Input Record Path must be oai_dc:dc:


Don't forget to add the datasource to the mapping table "Datasource Index Extensions"

Finally, I will create a new pipe using my new splitter and data source:

Data Source: {new_data_source_name}

Harvesting method: OAI

Server: {rosetta_oaiprovider_url}

Metadata format: {new_metadata_format}

Set: {new_set}


  Now all you have left to do is run indexing in Primo, and enjoy searching your full-text content!