-
Notifications
You must be signed in to change notification settings - Fork 38
Creating a new edition structure template
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:
-
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 filehtm-tpl-struct-iospe.xsl
- In
webapps/ROOT/stylesheets/epidoc/
paste the xsl file and change its name to your project’s name.
-
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">
-
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.
-
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 toepidoc-newname.xml
without applying any changes to it.
-
Back in
webapps/ROOT/stylesheets/epidoc
(not kiln!) openstart-edition.xsl
and import your stylesheet. -
In
webapps/ROOT/sitemaps
openconfig.xmap
and change the content of the<epidoc-edn-structure>
variable to your project's name.