Skip to content

Creating a new edition structure template

Polina Yordanova edited this page Apr 8, 2018 · 9 revisions

The simplest way to create a new edition structure template is to duplicate and rename an existing template that is close to the desired result and customize it as needed. These can be found in webapps/ROOT/kiln/stylesheets/ and are xsl files containing templates with instructions for transformation. Following the logic which EFES is based on – keeping project-specific content separated from “core kiln” files, we should not modify the files in this folder, but only make a copy of the xsl file, place it in webapps/ROOT/stylesheets/epidoc (not kiln!), and customize it there. This allows us to test and apply all desired changes without risking to break any of the provided functionalities of EFES.

Here is what you need to do in order to create your own edition structure template:

  1. Find the existing epidoc edition structure templates in webapps/ROOT/kiln/stylesheets/ and copy the one that most closely represents the structure you want to have for your project.

    For example, let’s assume that the edition structure used in the Ancient Inscriptions from the Northern Black sea (IOSPE) is the closest to what we want our edition structure to look like; this means we need to copy the file htm-tpl-struct-iospe.xsl

  1. In webapps/ROOT/stylesheets/epidoc/ paste the xsl file and change its name to your project’s name.

  1. Open the file and change the references to the edition structure you’ve copied to the new name.

    Let’s say we want to use the css associated with the iospe edition structure. This means we need to keep the name “iospe” in the elements that shape the html, so we should only substitute “iospe” with “newname” in the three templates: <xsl:template name=’iospe-body-structure’>, <xsl:template name=’iospe-structure’>, and <xsl:template name=’iospe-title’>:
<xsl:template name="newname-body-structure">
... 
<xsl:template name="newname-structure">
...
<xsl:template name="newname-title">
  1. Customize the file to create your project's edition structure.

    We could remove or reorganize the order of categories in the iospe edition structure, make it so that the interpretative edition comes before the metadata, add a parallel display of the interpretative and diplomatic editions etc.

  2. In webapps/ROOT/assets/templates make a copy of an epidoc-*.xml and change the name.

    These templates are needed for the transformation of the xml. Since we have been customizing IOSPE’s edition structure, we need to copy epidoc-iospe.xml and rename it to epidoc-newname.xml without applying any changes to it.

  1. Back in webapps/ROOT/stylesheets/epidoc (not kiln!) open start-edition.xsl and import your stylesheet.

  2. In webapps/ROOT/sitemaps open config.xmap and change the content of the <epidoc-edn-structure> variable to your project's name.