Research Interests
Direct Links
Relevant Links


PortraitPutting EndNotes References Online!

While working on my own site, I've realized a need to place my publications online and keep the synchronized. Similarly to many others, I manage my publications with EndNote as it is exceptional time saver. The question is: Is there an easy way to maintain an updated list of publications (or other set of references) online in arbitrary nice format?
Well, yes! Below I provide a step-by-step procedure of generating a dynamic WEB page, representing EndNote's file online in configurable and nice forma (like this one, for example). You are most welcome to contact me with whatever questions you might have here.


Well, what does it take?

Obvious ely, you need EndNote . In fact, you need XML file produced from the library you want to publish.

Adobe's SPRY library is the only other tool you really need. Don't worry, it's quite simple to use and I'm going to guide you through the process.

Preparing the data

Open the library of your interest in EndNote and select the publications you want to publish (Ctrl-A to select the entire library) . Now, we are going to export selected publications in XML format. To do that, in the EndNote, go to File->Export, select "xml" from "Save as type" drop down box at the bottom and place the XML file (say, MyPublications.xml) in the designated folder of your site.

Notice, that eventually the publication will be presented in the order in which they are arranged when you export them from EndNote.

Setting up the site

Now, get the SPRY library from Adobe. You'll need version 1.5 or above.

For Dreamweaver users
Notice, that Dreamweaver CS3 is delivered with 1.4 which is not sufficient. To update your environment, just replace the files in Dreamweaver's "configuration\Shared\Spry\" folder with the corresponding files in the updated version. Some files will be spare (don't worry they are not required. The library is built so that each file is independent of the rest. In fact, you can mix different versions in the same application).

In your site tree, create a folder named SpryAssets (or whatever name you like) and copy the following SPRY JavaScript files there:

  • xpath.js
  • SpryData.js
  • SpryNestedXMLDataSet.js
  • SpryCollapsiblePanel.js
  • SpryCollapsiblePanel.css

Creating and Configuring your Publications WEB page

Now, create a new html web page (let's call it Publications.html and place it at the site's root folder). First, the html page must link to the required JavaScript and CSS files (from above). Somewhere at the top of Publications.html (between <head> and </head>) place the following lines:

<script language="JavaScript" src="SpryAssets/xpath.js" type="text/javascript"></script>
<script language="JavaScript" src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script language="JavaScript" src="SpryAssets/SpryNestedXMLDataSet.js" type="text/javascript" ></script>
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<script type="text/javascript">

Of course, you should change the locations of js and css files according to their actual location.

Next, let's put in the code which loads the XML file (the one produced by EndNote earlier) and contracts a simple relational database which represents your publications.

<script type="text/javascript">

var dsRecord = new Spry.Data.XMLDataSet("Files/MyPublications.xml", "xml/records/record");
var dsAuthors = new Spry.Data.NestedXMLDataSet(dsRecord,"contributors/authors/author");
var dsTitles = new Spry.Data.NestedXMLDataSet(dsRecord,"titles/title");
var dsJournal = new Spry.Data.NestedXMLDataSet(dsRecord,"titles/secondary-title");
var dsPages = new Spry.Data.NestedXMLDataSet(dsRecord,"pages");
var dsVolume = new Spry.Data.NestedXMLDataSet(dsRecord,"volume");
var dsNumber = new Spry.Data.NestedXMLDataSet(dsRecord,"number");
var dsDates = new Spry.Data.NestedXMLDataSet(dsRecord,"dates/year");
var dsAbstract = new Spry.Data.NestedXMLDataSet(dsRecord,"abstract");
var dsURLs = new Spry.Data.NestedXMLDataSet(dsRecord,"urls/related-urls/url");
var dsKeywords = new Spry.Data.NestedXMLDataSet(dsRecord,"keywords/keyword");

var MyName = "Muchnik";


Next, there is some extra code, which takes care of dynamic creation of collapsible panels for these of the publications for which abstracts are available.

<script type="text/javascript">
// the following code is executed after the data has been rendered. The code creates collapsible panel object for
// any existing Abstract. All abstracts are created hidden.
var AbstractPanels = new Array();
var PublicationsRegionObserver = new Object;
PublicationsRegionObserver.onPostUpdate = function(notifier, data)
while (AbstractPanels.length>0) { // clean up. this code is never executed since data is rendered once at the page load.
delete AbstractPanels.pop();
for (i = 0; i < dsRecord.getRowCount(); ++i) {
DocumentElement = document.getElementById("PublicationAbstract_" +i);
if (DocumentElement!=null) { // test if abstract area was created for the record i.
AbstractPanels.push(new Spry.Widget.CollapsiblePanel("PublicationAbstract_" +i,{ contentIsOpen: false }));
Spry.Data.Region.addObserver("PublicationsRegion", PublicationsRegionObserver);

This code should also be placed in the html file header, but below the include statements. Change the MyName variable value to your name. This variable is used to emphasize your name in the publication reference.

Now, finally place the code below in your html's file body. The last thing to do is to provide some image to represent downloadable paper (DownloadButton.jpg)

<!--Page area, containing the publications list-->
<span id="PublicationsRegion" spry:region="dsRecord dsTitles dsAuthors dsJournal dsPages dsVolume dsNumber dsDates dsAbstract dsURLs dsKeywords">
<!-- Loops over all publications -->
<span id="PublicationRecordRepeat" spry:repeat="dsRecord" >
<!-- For each publications prints the following information: -->
<span id="PublicationYearsRepeat" spry:repeatchildren="dsDates">
<b>({dsDates::style})</b>&nbsp; <!-- year -->
<!-- list of authors -->
<span id="PublicationAuthorsRepeat" spry:repeatchildren="dsAuthors">
<span spry:choose="spry:choose">
<span spry:when="{dsAuthors::ds_RowID}>0 && {dsAuthors::ds_RowID}+1<{dsAuthors::ds_RowCount}">,&nbsp;</span>
<span spry:when="{dsAuthors::ds_RowCount}>1 && {dsAuthors::ds_RowID}+1=={dsAuthors::ds_RowCount}">&nbsp and </span>
<span spry:default="spry:default"></span>
<span spry:choose="spry:choose"><br> <!-- print author names, emphasizing the site owner -->
<span spry:when="'{dsAuthors::style}'.search(MyName)!=-1"><b>{dsAuthors::style}</b></span>
<span spry:default="spry:default">{dsAuthors::style}</span>
<!-- Journal Name -->
<span id="JournalNameRepeat" spry:repeatchildren="dsJournal"> {dsJournal::style}&nbsp; </span>
<!-- Volume -->
<span id="PublicationVolumeNumberRepeat" spry:repeatchildren="dsVolume"> <b>{dsVolume::style}</b>, </span>
<!-- Pages -->
<span id="PublicationPagesRepeat" spry:repeatchildren="dsPages">{dsPages::style}, </span>
<span id="PublicationTitlesRepeat" spry:repeatchildren="dsTitles">
<!--links to publications-->
<span id="PublicationsURLsRepeat" spry:repeatchildren="dsURLs">
<span spry:if="{dsURLs::ds_RowID}==0">Download:</span>
<a href="{dsURLs::style}" ><img height="20" align="absmiddle" src="Images/DownloadButton.jpg" alt="Download" longdesc="{dsURLs::style}"></a>&nbsp;
<span spry:if="{dsURLs::ds_RowID}+1=={dsURLs::ds_RowCount}"><br></span>
<!-- keywords -->
<span id="PublicationKeywordsRepeat" spry:repeatchildren="dsKeywords" >
<span spry:if="{dsKeywords::ds_RowID}==0">Keywords:&nbsp;</span>
<span spry:if="{dsKeywords::ds_RowID}+1=={dsKeywords::ds_RowCount}"><br></span>
<!--Abstract -->
<span spry:if="{dsAbstract::ds_RowCount}>0">
<div id="PublicationAbstract_{dsRecord::ds_RowID}" class="CollapsiblePanel">
<div class="CollapsiblePanelTab">Abstract</div>
<div class="CollapsiblePanelContent">
<span id="PublicationAbstractRepeat" spry:repeatchildren="dsAbstract" > {dsAbstract::style} </span>
new Spry.Widget.CollapsiblePanel("PublicationAbstract_{dsRecord::ds_RowID}",{ contentIsOpen: false });


Other WEB Tips & Tricks