forked from kcl-ddh/kiln
-
Notifications
You must be signed in to change notification settings - Fork 40
Creating a new edition structure template kiln
Polina Yordanova edited this page Apr 8, 2018
·
1 revision
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.
- 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. - 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. - 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"/>
. - 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">
. - 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.