PubMed XML in eXist on OS X

This assumes Tomcat is already installed and controlled by launchd. An alternative would be to launch eXist as a standalone service using Jetty (bin/startup.sh)

  1. Fetch and build eXist:
    svn co https://exist.svn.sourceforge.net/svnroot/exist/trunk/eXist
    cd eXist
    ./build.sh
  2. Install into Tomcat:
    ant dist-war
    sudo cp dist/exist*.war /usr/local/tomcat/webapps/exist.war
    sudo launchctl stop org.apache.tomcat.tomcat6
    sudo launchctl start org.apache.tomcat.tomcat6
  3. Fetch XML from PubMed using PHP: include my PHP function for downloading XML from PubMed, and call it with a query for the data required, eg pubmed_fetch('Review[PTYP]');
  4. Create a new collection, using the graphical eXist admin client (bin/client.sh):

    'Create new collection' button [call the collection 'pubmed']
    'Store' button [select your PubMed XML file and wait for it to be imported]

  5. Connect to the WebDAV service: Finder > Go > Connect to Server: http://localhost:8080/exist/webdav/db
  6. Create a configuration file for the new collection: /db/system/config/db/pubmed/collection.xconf
  7. Set up some indexes, then reindex the collection (File > Reindex Collection in the admin client).