Rocket NXT

To integrate PDF Highlighter with Rocket Folio NXT, update xhitlist.xsl template file.

Step 1: Include and init Highlighter JS#

Update <xsl:template match="/"> section by adding the following to the end of document <head> section:

<script type="text/javascript" src="/highlighter/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/highlighter/js/jquery.pdf-highlighter.js"></script>
jQuery(document).ready(function() {
var hlConfig = {
highlighterUrl: "/highlighter"

This code snippet loads jQuery PDF Highlighter plugin and initializes it, attaching Highlighter to all links having data-uri attribute (which we add in Step 3).

We assumed here that Highlighter is available under the /highlighter path on the same IIS website (e.g. setup using reverse proxying).

Step 2: Add query attribute to the results table#

Find search results table header, and add the data-query attribute. The relevant section looks like the sample below โ€” the added line is #2.

<table width="100%">
<xsl:attribute name="data-query"><xsl:value-of select="list-section/query" /></xsl:attribute>
<td class="hit-head" align="right" width="1%">&#160;</td>
<td class="hit-head">Title</td>
<xsl:if test="contains(/list-section/select, ';title-path')">
<td class="hit-head">Location</td>

Step 3: Modify result links to PDF documents#

Find the template <xsl:template name="build-document-link"> , and update the section that controls the PDF document link construction โ€” so it looks like this:

<xsl:when test="$content-type = 'application/pdf'">
<xsl:attribute name="data-uri"><xsl:value-of select="$path"/></xsl:attribute>
<xsl:attribute name="data-view-url">#!-- #EXECUTIVE:SCRIPT_NAME --#/<xsl:text/>
<xsl:value-of select="$path"/>
<xsl:attribute name="data-alt-url">#!-- #EXECUTIVE:SCRIPT_NAME --#/<xsl:text/>
<xsl:value-of select="$path"/>
<xsl:attribute name="onclick">return fixupLink(this)</xsl:attribute>

Note that we added both uri and viewUrl attributes:

  • uri parameter will be used by Highlighter to locate the PDF document. Setup serving local files to properly map uri to a local file.
  • viewUrl parameter will be used in the document serving path so, when highlighting PDF viewer is used, the user receives the PDF document through Rocket NXT.

The above code snippet assumes that the $path node contains a valid path to the PDF document on file system. If your indexer transforms the path โ€” so it doesn't reflect the file system path any more โ€” you should store the original file path in another node (e.g. $title-path) and reference this node in line #3.