Skip to content

Running EFES with your EpiDoc XML files

Polina Yordanova edited this page Mar 27, 2018 · 5 revisions

Adding your EpiDoc XML files to EFES

  • From the command line, run:
    • Windows: build.bat file
    • Mac OS X or GNU/Linux: build.sh script

This will start Jetty - a webserver that can support all the components of EFES in the beginning of your project (for more detailed instructions see Installation )

  • In your file explorer navigate to webapps/ROOT/content/xml/epidoc/ and place your XML files (with .xml extension) there. When you first install EFES, this folder will contain 15 example EpiDoc files to help you start off. You may delete those once you have tested all of EFES' functionality and start using your own project's files.
  • In the browser index the files with the Index all (search) button from the Admin page (note that if the server is not already running you will not be able to connect)



    Where you can find the Indexing:

  • You should now be able to see a list of your XML files when you open the Inscriptions page.

Configuring EpiDoc XML display

EFES uses the Epidoc example XSLT for HTML display. The parameters are customized in the config.xmap sitemap that lives in webapps/ROOT/sitemaps. This is done by changing the content of the epidoc-related global variables (c. line 80 in the file):

    <epidoc-edition-type>interpretive</epidoc-edition-type>
    <epidoc-edn-structure>iospe</epidoc-edn-structure>
    <epidoc-external-app-style>iospe</epidoc-external-app-style>
    <epidoc-image-loc>/images/</epidoc-image-loc>
    <epidoc-internal-app-style>none</epidoc-internal-app-style>
    <epidoc-leiden-style>panciera</epidoc-leiden-style>
    <epidoc-line-inc>5</epidoc-line-inc>
    <epidoc-verse-lines>off</epidoc-verse-lines>

A list of all possible values and what each variable is responsible for can be found in webapps/ROOT/kiln/stylesheets/epidoc/README.txt.

More extensive customisation of EpiDoc XSLT can be done by adding XSLT code to webapps/ROOT/stylesheets/epidoc/start-edition.xsl that overrides or extends the XSLT templates in webapps/ROOT/kiln/stylesheets/epidoc.

Creating your own edition structure template

The simplest way to create a new edition structure template will be to duplicate and rename an existing template—choose one that is close to your desired result, and customize it as needed. The following process assumes you are working from a duplicated copy, using the existing template oldname and creating your own template newname.

  1. Find the existing XML templates in webapps/ROOT/assets/templates/. Make a copy of epidoc-oldname.xml and rename it to epidoc-newname.xml. Open this file, and change all references within (in parameter names etc.) from oldname to newname.
  2. Find the existing XSLT templates in webapps/ROOT/kiln/stylesheets/epidoc, make a copy one of htm-tpl-struct-oldname.xsl, and rename it to htm-tpl-struct-newname.xsl. Open this file, and again change all references within (in template names etc.) from oldname to newname.
  3. In the same folder open start-edition.xsl; in the list of <xsl:include> elements, create a new element to include your new stylesheet: <xsl:include href="htm-tpl-struct-newname.xsl"/>.
  4. Still in start-edition.xsl, duplicate one of the <xsl:when> tests, including all of the xsl:parameters within it, testing for your new parameter value <xsl:when test="$edn-structure='newname'"> and calling on the new template that you created (in 2. above) <xsl:call-template name="newname-structure">.
  5. Finally, in config.xmap (in webapps/ROOT/sitemaps) change the content of <epidoc-edn-structure> to your new template name "newname".

You may now customize your new stylesheet to make any changes to the edition structure for your project.

Interpretive and diplomatic editions: parallel display

It could be useful to display both the interpretive and the diplomatic edition type styles together on the same page. This function has already been provided for the "inslib" edition structure so we can borrow the code from it and apply it to any other style, including our own edition structure template. Here are the steps we need to follow in order to modify the "iospe" edition style:

  1. Create a new htm-tpl-struct-iospe.xsl in webapps/ROOT/stylesheets/epidoc. Its content should be a copy of the entire <xsl:template name="iospe-body-structure"> from the stylesheet of the same name contained in the kiln folder: webapps/ROOT/kiln/stylesheets/epidoc/htm-tpl-struct-iospe.xsl.
  2. Copy the entire <div class="section-container tabs" data-section="tabs"> (c. lines 89-116) from webapps/ROOT/kiln/stylesheets/epidoc/htm-tpl-struct-inslib.xsl
  3. In the non-kiln webapps/ROOT/stylesheets/epidoc/htm-tpl-struct-iospe.xsl replace the entire <div id="edition" class="iospe"> with the div from step 2.
  4. In start-edition.xsl in webapps/ROOT/stylesheets/epidoc write an import for the newly created stylesheet after the import of the kiln start-edition.xsl:
    <xsl:import href="../../kiln/stylesheets/epidoc/start-edition.xsl" />
    <xsl:import href="htm-tpl-struct-iospe.xsl"/>