-
Notifications
You must be signed in to change notification settings - Fork 38
Running EFES with your EpiDoc XML files
- 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.
- If you are not able to see your files contents after clicking on them, it may be because their
<TEI>
root element has an@xml:lang
attribute value different from the one of the default language (en): in this case, you can change it toxml:lang="en"
(or delete the@xml:lang
attribute, or change the EFES default language in<default-display-language>
at ca. line 106 ofwebapps/ROOT/sitemaps/config.xmap
file).
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.
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.
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:
- 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. - 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 - 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. - 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"/>