Copyright held by
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Further details of licences are available from our
Licences page. For more
information, contact the project director,
Provider: University of Victoria
Database: The Map of Early Modern London
Content: text/plain; charset="utf-8"
TY - ELEC
A1 - El Hajj, Tracey
ED - Jenstad, Janelle
T1 - MoEML’s ePub Developer Documentation
T2 - The Map of Early Modern London
ET - 7.0
PY - 2022
DA - 2022/05/05
CY - Victoria
PB - University of Victoria
LA - English
UR - https://mapoflondon.uvic.ca/edition/7.0/epubDev_about.htm
UR - https://mapoflondon.uvic.ca/edition/7.0/xml/standalone/epubDev_about.xml
TY - UNP
ER -
The Julian calendar, in use in the British Empire until September 1752. This calendar is used for dates where the date of the beginning of the year is ambigious.
The Julian calendar with the calendar year regularized to beginning on 1 January.
The Julian calendar with the calendar year beginning on 25 March. This was the calendar used in the British Empire until September 1752.
The Gregorian calendar, used in the British Empire from September 1752. Sometimes
referred to as
The Anno Mundi (year of the world
) calendar is based on the supposed date of the
creation of the world, which is calculated from Biblical sources. At least two different
creation dates are in common use. See Anno Mundi (Wikipedia).
Regnal dates are given as the number of years into the reign of a particular monarch.
Our practice is to tag such dates with
Project Manager, 2020.
Junior Programmer 2018-2020. Research Associate 2020-2021. Tracey received her PhD from the Department of English at the University of Victoria in the field of Science and Technology Studies. Her research focuses on the
Programmer, 2018-present. Junior Programmer, 2015-2017. Research Assistant, 2014-2017. Joey Takeda was a graduate student at the University of British Columbia in the Department of English (Science and Technology research stream). He completed his BA honours in English (with a minor in Women’s Studies) at the University of Victoria in 2016. His primary research interests included diasporic and indigenous Canadian and American literature, critical theory, cultural studies, and the digital humanities.
Janelle Jenstad is Associate Professor of English at the University of Victoria, Director of
Programmer at the University of Victoria Humanities Computing and Media Centre (HCMC). Martin ported the MOL project from its original PHP incarnation to a pure eXist database implementation in the fall of 2011. Since then, he has been lead programmer on the project and has also been responsible for maintaining the project schemas. He was a co-applicant on MoEML’s 2012 SSHRC Insight Grant.
Most MoEML documents, or significant fragments with mol:
prefix and accessed through the web application
with their id + .xml
.
The molagas prefix points to the shape representation of a location on MoEML’s OpenLayers3-based rendering of the Agas Map.
Links to page-images in the Chadwyck-Healey
Links to page-images in the
The mdt (MoEML Document Type) prefix used on
The mdtlist (MoEML Document Type listing) prefix used in linking attributes points to a listings page constructed from a category in the central MDT taxonomy in the includes file. There are two variants, one with the plain _subcategories
, meaning all subcategories of the category.
The molgls (MoEML gloss) prefix used on
This molvariant prefix is used on
This molajax prefix is used on
The molstow prefix is used on
The molshows prefix is used on
The sb prefix is used on
Our editorial and encoding practices are documented in detail in the Praxis section of our website.
XSLT
files responsible for creating MoEML ePubs.
Jenkins_to_epub.xsl
Epub_supplementary_files.xsl
List_css_for_epub.xsl
List_fonts_for_epub.xsl
List_images_for_epub.xsl
createEpubs.xml
This documentation details the XSL
and XML
files responsible for building the ePubs.
jenkins_to_epub.xsl
This XSL
transformation processes the source XHTML
file, retrieved from Jenkins, to make it compatible with the ePub output that we desire. It mainly deletes components that are not needed in the production of ePubs. It includes epub_globals.xsl
, which has all the required variables and parameters.
This transformation results in a XHTML
document with the $docId
name, saved in the output folder (as defined in epub_globals.xsl
). It removes the following items: top banner, related information, page XML
, script elements, breadcrumbs, send feedback, footer menu, document mentions, people’s contributions, facsimiles, agas.css
link, agas_embedded.css
, people’s abbreviations, roles played, membership organizations, and social media logos.
Then, jenkins_to_epub.xsl replaces unused CSS
links with new ePub CSS
links, and rewrites local links into externals directing to the MoEML website when necessary. One of the templates rewrites links for graphics to images, and makes full sized images links into externals.
There are templates that move some elements from one position to another, such as variant spellings and historical figures. One template sorts the personography alphabetically.
epub_supplementary_files.xsl
This transformation writes the supplementary files needed for the generation of every ePub. It includes epub_globals.xsl
. The root template calls the document’s named templates (explained below).
creates the mimetype file. It is a text output with one line: application/epub+zip
.
creates the container.xml
file and stores it in META-INF
folder. It is a XML
output file, with a rootfile element containing the path to package.opf
.
The cover file is an XHTML
file saved in the main document-specific EPUB
folder. In its head element, this page gets the first title element with a property attribute of value titlePage
. The actual cover is the cover image that we take from the corresponding PDF document that we build. It is in .png
format.
This template creates another title page that contains hybrid metadata, which includes the title, authors, compilers, and editors, in addition to the publication information. This template contains two conditions, one is when the document at hand is a born digital file and the other is when it is a primary source file.
This template creates the CSS
styling for the nav
page. The resulting document is a .css
file. The template body is written in CSS
.
This template creates the CSS
styling for the metaHybrid
page. The resulting document is a .css
file. The template body is written in CSS
.
The package file is in .opf
format. It should list all the files—including images—that are mentioned in the ePub When a file is in the ePub but not mentioned in the package file, the validator will flag an error. It is also erroneous if an item is mentioned in the package file but is not saved in the ePub folder. The template gets the items from the lists that we generate for the creation of the ePub.
This template is responsible for creating the nav.xhtml
file. It lists the page contents submenu of a document when a list element with id attribute pageContents
is available. It ends with a script element (javascript
).
This template also creates a table of content, with a
This template creates the CSS
styling for the epub .xhtml
file. The resulting document is a .css
file. The template body is written in CSS
. It overwrites other styling, unless the platform does not allow it.
This template creates the CSS
styling for the cover image. The resulting document is a .css
file. The template body is written in CSS
.
This XSLT
also has unnamed templates. One template rewrites a local link to make it a link from the cover file to the content file, and removes breaks after the title for styling purposes. Another template deals with nav.xhtml
file, as well as rewrites a local link to make it a link from the nav
file to the content file. A third template deals with some styling of lower level
list_css_for_epub.xsl
This XSLT
creates the list of CSS
files needed for the ePub, which will determine what files will be copied into the EPUB/CSS
folder. The resulting document is a .txt
file. The links are retrieved from the source file. Some additional links are hard coded.
list_fonts_for_epub.xsl
This XSLT
creates the list of fonts needed for the ePub, which will determine what files will be copied into the EPUB/fonts
folder. The resulting document is a .txt
file. The root template contains a variable $cssFiles
that reads the CSS
files. Variable $tokenizedCss
tokenizes the css files, so that variable $allCss
can normalize them. The root template then analyzes the strings and applies the necessary changes to produce the list.
list_images_for_epub.xsl
This XSLT
creates the list of images needed for the ePub, which will determine what images will be copied into the EPUB/images
folder. It follows the same process as that of list_fonts_for_epub.xsl
.
createEpubs.xml
This XML
file is the Ant
application responsible for creating the ePubs. It handles the processing of XHTML
documents retrieved from MoEML’s Jenkins. It requires tools located in utilities
, and assumes that ant-contrib
is installed.
A list of properties are defined, most of which are for the paths of necessary files and/or folders. For instance, graphicsFolder
defines the path of the graphics folder in the SVN
repository, from which some images will be copied.
Checks the current version of the epubcheck.jar
file in utilities
. If the file is not available, a value of 0.0.0
will be returned, which will trigger a download because it is (always) less than the current version.
Checks the GitHub
repository for the validator to determine the latest version number. This number will be compared against the current version; if it is lower, then a download is required.
Checks whether or not epubcheck.jar
is available and up to date. If it is absent or out of date, the latest version gets downloaded.
This target depends on the availability of epubcheck.jar
. It passes the file to the validator, which in turn outputs the results (including any warnings or errors).
Retrieves the appropriate HTML
file from the latest Jenkins build, to be then processed into an ePub. This target creates the sourceFiles
folder if it has not been already created.
Processes the original source file into a simplified and ePub compatible version of the file. It relies on the jenkins_to_epub.xsl
stylesheet.
Creates a list of CSS
files which are in the repository and are referenced in the document being processed, so that we copy them into the corresponding folder, only as needed. It relies on the list_css_for_epub.xsl
stylesheet.
Copies the set of required CSS
files as per the list created in the previous target.
Creates a list of fonts which are in the repository and are referenced in the document being processed, so that we copy them into the corresponding folder, only as needed. It relies on the list_fonts_for_epub.xsl
stylesheet.
Copies the set of required fonts as per the list created in the previous target.
Creates a list of images which are in the repository and are referenced in the document being processed, so that we copy them into the corresponding folder, only as needed. It relies on the list_images_for_epub.xsl
stylesheet.
Copies the set of required images as per the list created in the previous target. This target also creates the EPUB/images
directory, and copies files into it, from directories defined in the properties (as discussed above).
Creates the supplementary files needed for the ePub being generated. It relies on the epub_supplementary_files.xsl
stylesheet.
Adds the supplementary files, creating the necessary directories: EPUB
and META-INF
.
Uses the appropriate docId
parameter, to retrieve the source document and then process it into the ePub. This target calls the following targets: getSourceFileFromJenkins
, sourceFileToEpubXhtml
, createCssList
, createFontsList
, createImagesList
, copyCss
, copyFonts
, copyImages
, createSupplementaryFiles
, addSupplementaryFiles
, buildEpub
, and validateEpub
.
This is the default target. It uses the idList
input parameter to retrieve selected source documents, and then calls processOneFile
to process the documents into ePubs.
Creates an ePub file from the XHTML
file. The XHTML
file is found in the parameter inFile
. After processing the XHTML
as per jenkins_to_epub.xsl
, the ePub folder (with all its contents and child folders) is zipped; the mimetype file should be zipped first, and other folders follow.