Skip to content

KONDE-AT/dsebaseapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dsebaseapp

dsebaseapp stands for Digital (Scholarly) Editions Base Application. Its purpose is to bootstrap the development of (web) applications which support the process of

  • creating
  • curating
  • enriching
  • analysing
  • and publishing

texts encoded in XML and validating against a TEI (P5) schema.

dsebaseapp based projects

History

dsebaseapp is a successor of the generic-de-web-app project described by the blog post series How to build a digital edition web app. While these blog posts were focused on describing general principles and basic implementations of a digital edition web app, dsebaseapp should help you getting things done. generic-de-web-app as well as dsebaseapp are designed as (almost) self-containing eXist-db packages. Therefore you can

  • install your dse-web application via eXist-db’s package manager,
  • download your dse-web app via eXist-db’s package manager,
  • and tweak your app via eXist-db’s built in editor eXide.

Web app features

The application ships with the following default features:

  • A customizable (in terms of ordering and filtering) table of contents of documents stored in specific directories

  • Links from this table of contents to HTML views

  • Default XSLT transforms TEI documents into HTML

  • Full text search over all documents in the edition.

  • Linking between index entries (e.g. of persons, places, …) and mentions of those indices in the text (e.g. through @ref) is supported.

  • Index based search

  • Access to data via simple API(s)

  • Timeline and Network visualisations

  • Map Visualisation of georeferenced places

  • GND Beacon

  • several scripts for processing/enriching/harmonizing your data

  • an NLP (natural language processing) module for processing your data with 3rd party NLP services

  • autocomplete endpoints for entities

Basically all features mentioned above are implemented with plain XSLT, XQuery and some JavaScript.

Getting started

  1. Clone the repo into a suitable directory. Be aware that the name of the applications root directory will show up in several places (e.g. the name of the application’s .xar package) git clone https://github.com/KONDE-AT/dsebaseapp.git <folder-name>

  2. Run a search and replace through the whole codebase, replacing dsebaseapp with e.g. the name of your application’s root directory. Since dsebaseapp is used in several namespaces, make sure the replacement string does not contain any tricky characters.

  3. Go through the data directory and replace the existing data with your own. But keep the directory structure (data/editions/, data/indices/, data/meta/) as it is.
    Ideally, your data (structure, markup) is very similar to the application’s sample data – in this case most of the features mentioned above should work 'out of the box'.

  4. After these initial changes try to build your application by running ant in your application’s root directory. This should create a <folder-name>.xar in <folder-name>/build/.

  5. Install this package via eXist-db’s package manager.

  6. Click through your application and start customizing.

Customization

XML2HTML

The detail views of the 'regular' XML/TEIs is generated by a simple XML2HTML transformation using an XSLT stylesheet. The stylesheet(s) used for this transformation are located in <folder-name>/resources/xslt/. Which XSLT is going to be used for the transformation depends on the actual request.

  • explictly: by adding an stylesheet URL parameter providing the name of chosen styleseheet
    • show.html?document=about.xml&directory=meta&stylesheet=meta
  • implictly I: if there is no stylesheet param provided, the for the transformation responsible function app:XMLtoHTML looks in the <folder-name>/resources/xslt/ for a stylesheet with the same name as the collection where the to processed XML is located.
    • a request like /show.html?document=1771-IV-17.xml&directory=editions will be processed by an XSLT <folder-name>/resources/xslt/editions.xsl
  • implictly II: if there is no stylesheet param provided and also no stylesheet named like the collection, the script will search for an XSLT with the same name as the XML. (But the order of those lookups might change in future)
  • fallback: if no matching XSLT exists, the transformation uses a fallback XSLT which is declared in $app:defaultXsl
    • later defaults to doc($config:app-root||'/resources/xslt/xmlToHtml.xsl';

shared XSLTs

<folder-name>/resources/xslt/shared/ contains to XSLTs (base.xsl and base_index.xsl) which can be included in the actual processing templates because they provide common TEI to HTML transformation templates.

Index views

The index views for persons, places, … are created with XQuery functions, called through eXist-db’s templating system and stored in <folder-name>/modules/app.xql. To find out which function is responsible for which view, look into the according HTML. To modify e.g. the person index view called by the URL .../pages/persons.html you need to

  1. open <folder-name>/pages/persons.html
  2. search for the line(s) calling any template function like <tr data-template="app:listPers"/>
  3. Look up this function in <folder-name>/modules/app.xql.
  4. Tweak that function according to your needs.
  5. Make sure the number of returned columns match the HTML markup.