Difference between revisions of "WWP eXist-DB applications"

From Digital Scholarship Group
Jump to navigation Jump to search
Line 57: Line 57:
 
If XML data is stored in eXist for transformation and publication, it can be updated by navigating to the [https://wwp-test.northeastern.edu/exist/ eXist Dashboard], logging in, and uploading the newest files to the correct data folder.
 
If XML data is stored in eXist for transformation and publication, it can be updated by navigating to the [https://wwp-test.northeastern.edu/exist/ eXist Dashboard], logging in, and uploading the newest files to the correct data folder.
  
[[File:EXist-2.2-dashboard-login.png]]
+
[[File:EXist-2.2-dashboard-login.png|600px]]
  
 
For example, to add a new Exhibit to Women Writers in Context, you would log into the eXist Dashboard, as seen above. Then you would click on the "Collections" app, which shows the contents of the eXist database.
 
For example, to add a new Exhibit to Women Writers in Context, you would log into the eXist Dashboard, as seen above. Then you would click on the "Collections" app, which shows the contents of the eXist database.
Line 63: Line 63:
 
[[File:EXist-2.2-dashboard-collections-icon.png]]
 
[[File:EXist-2.2-dashboard-collections-icon.png]]
  
[[File:EXist-2.2-dashboard-collections-main.png]]
+
[[File:EXist-2.2-dashboard-collections-main.png|600px]]
  
 
You would navigate to the Exhibits XML collection at /db/exhibits/xml. It looks something like this:
 
You would navigate to the Exhibits XML collection at /db/exhibits/xml. It looks something like this:
  
[[File:EXist-2.2-dashboard-collections-exhibits-xml.png]]
+
[[File:EXist-2.2-dashboard-collections-exhibits-xml.png|600px]]
  
The button to upload a new file is the cylinder with the plus sign, at the end of the row of buttons. Clicking that button will let you upload a file from your computer—in this case, a TEI file from the Exhibits ecosystem under Subversion.
+
The button to upload a new file is the cylinder with the plus sign, at the end of the row of buttons. [[File:EXist-2.2-dashboard-collections-upload-button.png]] Clicking that button will let you upload a file from your computer—in this case, a TEI file from the Exhibits ecosystem under Subversion.
  
[[File:EXist-2.2-dashboard-collections-upload-button.png]]
+
[[File:EXist-2.2-dashboard-collections-upload-file.png|600px]]
 
 
[[File:EXist-2.2-dashboard-collections-upload-file.png]]
 

Revision as of 12:14, 20 December 2018

The Women Writers Project uses the eXist-DB database to query, transform, and publish XML files. Most of these "applications" are actually divided between eXist and the WWP server file system. In general, eXist is used to store and index XML files. The database also holds XQuery scripts which, on request, parse and return data in a web-friendly format (generally JSON or HTML).

On the server file system, an application mainly consists of an index HTML file and a Javascript file, as well as other web assets (CSS, images, etc.). The Javascript file is a Backbone.js application that makes calls out to the eXist application, using the responses to populate most pages in the browser. In fact, though the URL changes, a user navigating the WWP subproject site never actually leaves index.html. Instead, the Backbone app modifies the webpage and browser URL to match the conceptual "page" chosen by the user.

Publications with eXist

WWP endeavors which have an eXist-DB component are:


Women Writers in Context

The code for the WWiC website can be found in Subversion at DEV/exhibits. (Unlike the other endeavors, WWiC has no separation of code from data.) On the server, the index page and assets are symlinked from the "exhibits" directory to WEB/context. As a result, WWiC is visible from both https://wwp.northeastern.edu/context and https://wwp.northeastern.edu/research/projects/exhibits.

WWiC is not an EXPath application, but it does use XQueries as REST endpoints. In eXist, the XML, XSLT, and XQueries can be found at /db/exhibits. Exhibits encoders should have write access to this collection on the WWP-Test server, which enables easy pre-publication proofing.


Women Writers in Review

The code for the WWiR website can be found in Subversion at DEV/reception/utils. On the server, the index page and assets are symlinked from the "reception" directory to WEB/review. Unlike WWiC, Review is available only at https://wwp.northeastern.edu/review/index.html. The files are stored at https://wwp.northeastern.edu/research/publications/reception/utils/index.html, but the Backbone.js script will not work if accessed there.

WWiR is also an EXPath package, and uses RESTXQ to serve out data via an API. The XML files are stored in eXist at /db/reception-data, and the EXPath application will be installed at /db/apps/review.


Featured Quotation

The Featured Quotation on the WWP home page is generated randomly, with a request to eXist from the Javascript file at WEB/utils/bin/javascript/wwp.js. The HTML response then populates the quote widget.

The code in eXist is not an EXPath application. The XQuery qotr.xq and XSLT qotd.xslt are maintained in WEB/utils/stylesheets, and are saved in eXist at /db/quotes. Unlike most other eXist endeavors, the XML quotography is not stored in eXist. Instead, the XQuery uses the quotography on the appropriate server (production by default) at WEB/utils/xml/quotography.xml.


Text Tracker

Internal Documentation

The code for Internal Documentation is located in Subversion at WEB/research/publications/documentation/internal.

WWiC is not an EXPath application, but it does use XQueries as REST endpoints. In eXist, the XML, XSLT, and XQueries can be found at /db/wwpdoc. Documentation maintainers should have write access to this collection on the WWP-Test server, which enables easy pre-publication proofing.


Inspectre

Maintaining eXist-supported endeavors

Updating XML data

If XML data is stored in eXist for transformation and publication, it can be updated by navigating to the eXist Dashboard, logging in, and uploading the newest files to the correct data folder.

Error creating thumbnail: File missing

For example, to add a new Exhibit to Women Writers in Context, you would log into the eXist Dashboard, as seen above. Then you would click on the "Collections" app, which shows the contents of the eXist database.

EXist-2.2-dashboard-collections-icon.png

Error creating thumbnail: File missing

You would navigate to the Exhibits XML collection at /db/exhibits/xml. It looks something like this:

Error creating thumbnail: File missing

The button to upload a new file is the cylinder with the plus sign, at the end of the row of buttons. EXist-2.2-dashboard-collections-upload-button.png Clicking that button will let you upload a file from your computer—in this case, a TEI file from the Exhibits ecosystem under Subversion.

Error creating thumbnail: File missing