Documentation for Static Build Code

This document provides information about the static build process for MoEML. All of the documents are processed through an Apache Ant build, which calls on a number of XSLT tranformations. Below is generated documentation regarding the Ant build and the XSLT stylesheets.

ANT Build

Documentation for the ANT build.

Tasks

clean

Documentation This task cleans site content that may have been generated in previous runs. Each time the build is run, we delete all of the old content, and retrieve all necessary internal files as well as the the TEI-P5 RelaxNG schema.

getSvnInfo

Documentation This target retrieves the latest information from MoEML’s Subversion (SVN) repository and outputs it into a text file for use in site page generation.
Called from

copySiteAncillaryFiles

Documentation This target copies CSS, JavaScript and other static files from the static/ folder to the output site/folder.
Called from

createBinaryDocList

Documentation This target creates lists of binary documents which are in the repository and are actually referenced in real documents on the site, so that we only end up copying documents which are needed to the output.
Files used

copyBinaryDocs

Documentation This target copies the set of required binary documents which has been calculated in the preceding target from their original locations to the output folders in the static/site folder.

createImageLists

Documentation This target creates lists of images which are in the repository and are actually referenced in real documents on the site, so that we only end up copying images which are needed to the output.
Files used

copyImages

Documentation This target copies the set of required images which has been calculated in the preceding target from their original locations to the output folders in the static/site folder.

extractSchematron

Documentation This target extracts the Schematron ruleset from the tei_all RelaxNG schema, so that it can be used for validation.
Called from

createXslCaptions

Documentation This target processes the /db/data/boilerplate/boilerplate.xml file to extract all of the TEI <seg> elements which contain caption and boilerplate text definitions; it turns them into <xsl:variable> elements in an XSLT stylesheet module which is used throughout the rest of the build process.
Files used

createStowChapters

Documentation This task splits our edition of stow_1598 into chapters for ease of processing. This must come before the creation of the original XML so we can have accurate listings in many of our generated items (like the divGen in the peer_review page or the aggregate document type listings).
Files used
Called from

createOriginalXml

Documentation This target takes the set of TEI markup files which constitutes our dataset, in /db/data, and moves them to the output site/original folder, flattening their folder structure in the process. It also applies some minimal processing to them to regularize various things, expand XIncludes, and so on.
Files used
Called from

createGeneratedContent

Documentation This target creates a large set of additional TEI XML files which are mechanically constructed from existing data, including consolidated listings of variant spellings for place names, listings files for all the document categories and so on; it also creates some non-TEI files such as JSON files for the Agas Map. It calls a set of other ant targets to accomplish individual tasks.
Included Ant tasks

createVariantSpellingsFile

Documentation This target creates the global generated file listing variant spellings for place names. This is used for creating the Gazetteer pages, and also for components which appear on the HTML versions of individual location files.
Files used
Called from

createGazetteerAndCategories

Documentation This target creates the Gazetteer listings pages in the form of TEI XML files (later processed to create web pages), as well as the listings pages for each of the document categories in our document type taxonomy, again in the form of XML which will be later processed into HTML.
Files used
Called from

createAgasJsonFiles

Documentation This target creates the two JSON files used to power the interactive Agas Map: one is a list of categories for constructing the location menu, and the other is the list of actual locations, with info and coordinates.
Files used
Called from

createGeoJsonFile

Documentation This target creates the global generated file of all the locations in GeoJSON format. Stil in development... REQUIRES XSLT 3.0.
Files used
Called from

cleanRegnalCalendar

Documentation This target processes the spreadsheet file where all the data for the regnal calendar is maintained, to create a TEI XML file which can be processed in other ways later in the build process.
Files used

validateOriginalXml

Documentation This target validates the content of the site/xml/original folder, which consists of the slightly-massaged XML content from the source dataset along with a collection of generated XML files created in previous build steps. These files are validated against the tei_all schema (RNG and Schematron), and also against our project RelaxNG and Schematron.
Called from

createStandaloneXml

Documentation This target processes the files in the site/xml/original folder to create fully-expanded standalone versions of all of the documents. This involves copying referenced content from all over the rest of the collection into the target file, so that everything referenced inside it is basically included in it. These standalone files are the ones which are later processed to create the various other output formats, including XHTML5.
Files used
Called from

resolveStyleSelectors

Documentation This target processes any document which makes use of the rendition/@selector attribute to add an explicit pointer to the rendition element on any descendant element of <text> which the selector applies it to. This is a two-stage process involving the creation of temporary XSLT documents, which are applied, and then deleted.
Files used
Called from

runTempXslt

Documentation This target runs the temporary XSLT files produced in target resolveStyleSelectors.

rationalizeStyleAttributes

Documentation This target processes the various methods used to describe layout, appearance and other bibliographic features in primary source documents to make them more straightforward and efficient. For instance, all instances of equivalent @style attributes are converted into a single rendition element in the document header, and the @style attributes in the text replaced with pointers to the rendition element.
Files used
Called from

validateStandaloneXml

Documentation This target validates the TEI document collection in site/xml/standalone using the tei_all schema (RNG and Schematron).
Called from

createAjaxFragments

Documentation This target creates fragmentary XHTML5 documents which can be retrieved by AJAX calls from full documents in the output website content. These fragments are not normally needed, since most documents include all the popup content they need inside themselves due to having been built from standalone versions of their XML precursors, but if a popup content block itself contains a reference to another piece of content, that second-level reference will require an AJAX call in the final site. In addition, these AJAX fragments are themselves processed to create full standalone pages, and to provide the local content for standalone pages which will show info in popup form.
Files used
Called from

createStandardXml

Documentation This target takes the Standalone version of all our XML files (in site/xml/standalone) and transforms them to create a more standard form of TEI which is more likely to be processable in other projects, by changing or removing some of the more project-specific or idiosyncratic forms of encoding we happen to use in this project.
Files used
Called from

validateStandardXml

Documentation This target validates the content of the site/xml/standard folder, which consists of the standardized XML content created from the standalone files created in previous build steps. These files are validated against the tei_all schema (RNG and Schematron).
Called from

createSimpleXml

Documentation This target takes the Standalone version of all our XML files (in site/xml/standalone) and transforms them to create TEI Simple versions of the files, in the process discarding and normalizing a lot of the more obscure or unusual encoding from our project.
Files used
Called from

validateSimpleXml

Documentation This target takes the TEI Simple version of all our XML files (in site/xml/simple) and validates them against the current version of the TEI Simple schema.
Called from

createLiteXml

Documentation This target takes the Standalone version of all our XML files (in site/xml/standalone) and transforms them to create TEI Lite versions of the files, in the process discarding and normalizing a lot of the more obscure or unusual encoding from our project.
Files used
Called from

validateLiteXml

Documentation This target takes the TEI Lite version of all our XML files (in site/xml/lite) and validates them against the current version of the TEI Lite schema, retrieved from the TEI release site.
Called from

createKmlDocs

Documentation This target creates KML files from all the encoded GIS data in our location files. It works from the standalone versions of our files in site/xml/standalone, and generates results in site/xml/kml.
Files used
Called from

validateKmlDocs

Documentation We retrieve the latest KML schema from opengis.net and validate the newly created KML files using xmllint.

createKmzFile

Documentation We zip our KML files into a KMZ so that it can be loaded into Google Earth, if desired. We don’t use the KMZ file anywhere in the site, but it is downloadable.

createXhtmlDocs

Documentation This target generates most of the collection of XHTML5 documents comprising the output website from the standalone TEI documents in /site/xml/standalone.
Files used
Called from

copyAgasMapTiles

Documentation This target takes existing set of tiled images comprising the Agas Map and copies them to the output location in site/zoomify.

createAgasMapXhtml

Documentation This target creates the Agas Map XHTML5 interface page based on OpenLayers.
Files used

validateXhtmlDocs

Documentation This target validates the complete collection of XHTML5 documents comprising the output website, using the VNU validator (the same validator used by the W3C’s online validation service). We have to start by copying them to a temporary location, otherwise the vnu validator will try to validate all sorts of other files as well.
Called from

createRssFeeds

Documentation This target creates one or more RSS feed documents in RSS 2.0 format for MoEML content. Currently there are two: blogs.rss and news.rss.
Files used

validateRssFeeds

Documentation We validate our RSS feeds using xmllint with the RSS 2.0 XSD schema.

validateXml

Documentation This target is intended for developers to use after using a target, like subset or quick, that does not perform validation, but you would like to validate the XML products before committing your documents. Note that this validates the entire set of products, so it assumes that the framework and the products from the build are intact. This should be run before and after running a subset or quick target to test whether or not local changes are valid.
Included Ant tasks

subset

Documentation This target is intended for developers to use when they wish to pass a single document or a small subset through the whole process, so they don’t have to wait for the entire build to complete. It assumes that the framework of the output products is already in place; it does no cleanup; and it would normally be run with -DdocsToBuild=ABCH1,STMA12 etc.
Included Ant tasks

quick

Documentation This target is intended for developers to use when they wish to pass a single document or a small subset through the HTML generation sequence. It works the same way as the subset target except that it dispenses with the generation of Standard Simple, Lite and KML versions. It would normally be run with -DdocsToBuild=ABCH1,STMA12 etc.
Included Ant tasks

all

Documentation This is the default complete static build process target used by the Jenkins build process. If you are building locally, run this at least once to create a full output document set, and then you can run smaller targets as necessary to process smaller subsets of documents. This one removes all existing content first, and it takes a long while to complete (45 minutes to an hour, depending on the system it’s running on).
Included Ant tasks

XSLT Documents

Documentation for various XSLT documents called from the ANT build.

locations_to_geojson.xsl

Documentation
  • Created on: Dec 21, 2017
  • Author: mholmes
  • This is a module designed to generate GeoJSON from the MoEML location files. It also pilots the generation of GeoJSON geometries from the existing geo elements, which at the time of writing are simply crude lists of coordinates.
  • We use XSLT 3.0 so that we can create an XML framework to be saved out in JSON, a simpler and less error-prone approach than simply constructing the literal text output.
  • The included global locations variable contains the complete set of MoEML location files. For the moment, we use the untransformed original versions; in future we may work with versions further down the static build process.
  • See source.
  • Output is going to be JSON. I don’t think we need the json-node-output-method param to be set; we’ll see.
  • See source.
  • We use the variant spellings list document that has been generated earlier in the build process or during a previous build to get all the names of places.
  • See source.
  • Root template. This file is designed to run on itself or anything else. It loads its requirements dynamically.
  • See source.
Includes
Called from

list_binary_docs_used_master.xsl

Documentation
  • Created on: August 19, 2016
  • Author: mholmes
  • The purpose of this module is to parse through the XML documents in the project and generate a list of all the binary documents which are actually used (since there are many hanging around in the repo which are never referenced).
  • This list will be used by the ant static build task to copy over only those documents we actually need into the output images folder. The file will be a flat text file listing the filenames of these files.
  • See source.
Called from

list_images_used_master.xsl

Documentation
  • Created on: Mar 10, 2016
  • Author: mholmes
  • The purpose of this module is to parse through two sources, the XML documents in the project, and the CSS documents used for HTML rendering, and generate two lists of all the images which are actually used (since there are many hanging around in the repo which are never referenced).
  • This list will be used by the ant static build task to copy over only those images we actually need into the output images folder. The file will be a flat text file listing the filenames of these images, since we’re going to
  • See source.
Called from

get_captions_master.xsl

Documentation
  • Created on: Jan 04, 2016
  • Authors: mholmes and jtakeda
  • This module collects up user-designated captions from the boilerplate file and creates an XSLT file which makes them available as variables. These captions are used throughout the HTML rendering process.
  • See source.
  • Created on by an automated process.
  • Author: mholmes
  • This is a collection of captions and other useful strings used throughout TEI-to-HTML transformations.
  • See source.
Called from

xml_stow_chapter_master.xsl

Documentation
  • Created in: April 2016
  • Authors: jtakeda and mholmes
  • This is a master module that splits the divisions of an edition of Stow into individual TEI files. It also neccessarily changes @xml:ids and pointers so that everything is internally coherent. The TEI header is also adapted so that it better describes the chapter.
  • See source.
Includes
Called from

xml_original_master.xsl

Documentation
  • Created on: April 4, 2016
  • Author: mholmes and jtakeda
  • This module is part of the static site build process for MoEML. It processes all the current source XML files from the project into a flattened, single-folder representation, rewriting their xml-model processing instructions and expanding their XIncludes to create something from which other XML and XHTML outputs can more easily be derived. The meat of it is in the included xml_flatten_module.xsl file.
  • See source.
Includes
Called from

xml_variants_master.xsl

Documentation
  • Created on: Apr 13, 2016
  • Author: mholmes
  • This module handles the generation of an XML source file containing a very simple encoded collection of variant spellings for each location name. It is run as a standalone process to generate a useful file which can then serve as input for the gazetteer page generation process, as well as providing variant spellings for later incorporation into the XTHML output. The file is called on itself.
  • See source.
Includes
Called from

xml_create_generated_master.xsl

Documentation
  • Created on: Mar 31, 2016; based firmly on the createGazetteer.xsl module in the main utilities folder of the project.
  • Author: mholmes and jtakeda
  • The purpose of this stylesheet is to parse the entire data collection of the MoEML repo and create a set of MoEML TEI files each of which is the source for a single-letter page of the alphabetized gazetteer. This component of the file, although originally adapted from existing code, has now been rewritten completely (2016-04-22) because it can draw all its data from the spelling_variants.xml file which has already been created in a previous stage of the build.
  • This file is designed to run on itself, and find the collection of XML documents it operates on through a relative path on the filesystem. It runs as part of the static build process, and generates a set of TEI files. Those files are later processed into XHTML5 web pages, standalone XML, and so on.
  • A second component of the process generates the JSON code for the mdtEncyclopediaLocations subcategories, and for the Agas Map locations for each of the location documents (based on SVG paths). These files are used by the Agas Map interface rewritten 2014-15.
  • See source.
Includes
Called from

json_agas_master.xsl

Documentation
  • Created on: 13th June 2016, from an existing file in /db/data/utilities.
  • Author: mholmes
  • The purpose of this stylesheet is to generate the JSON code for the mdtEncyclopediaLocations subcategories, and for the Agas Map locations for each of the location. These files are used by as rewritten 2014-15.
  • See source.
Includes
Called from

fods_expand_master.xsl

Documentation
  • Created on: Oct 5, 2015
  • Authors: mholmes and jtakeda
  • Based off of stylesheet by mholmes for the Landscapes of Injustice project. The purpose of this stylesheet is to expand a generic FODS file (a flat-file version of a ODS spreadsheet) to add empty cells where they’re signalled by attribute values and to explicitly name style attributes when necessary. The result is much easier to process into other types of output.
  • See source.
Called from

xml_standalone_master.xsl

Documentation
  • Created on: Dec 24, 2015
  • Author: mholmes and jtakeda
  • This module is part of the static site build process for MoEML. It collects all of the current XML files in the MoEML project, in the original folder (meaning the slightly-massaged versions of our files that we provide to the public, rather than the original source, which is a bit confusing in its folder structure) and generates from them a collection of fully-expanded standalone version, which are then used as the basis for generating both other XML versions and the HTML pages for the site.
  • Note: this is a multi-stage transformation, relying on modes to process the content in two different ways. All templates must have a mode attribute, and all calls to apply-templates must pass on a mode.
  • Note: this was originally written to transform the original XML source documents, but it has been rewritten to process instead the set of documents in site/xml/original, on the basis that these have already been flattened and had their XIncludes expanded.
  • See source.
Includes
Called from

xml_resolve_style_selectors_master.xsl

Documentation
  • Created on: July 18 20161
  • Author: mholmes
  • The purpose of this module is to process documents which make use of the TEI attribute rendition/@selector. The content of this attribute is one or more CSS selectors which select elements in the transcribed content of the document to which the host rendition element should be applied. In this transformation, a new temporary XSLT file is created for each document in the collection which uses this attribute; the created XSLT can later be applied by the build process to perform an identity transform which adds explicit instances of @rendition to the target elements, replacing the use of @selector with a more easily-processable link between the element and the rendition rules to be applied to it.
  • The main requirement here is to transform the CSS selector(s) in the @selector attribute of the rendition element into XSLT @match attributes on xsl:template elements.
  • See source.
  • Created on by an automated process.
  • Author: mholmes
  • This is a temporary stylesheet designed for one-off processing of a single document, to replace usages of @selector with @rendition attributes on the target elements.
  • See source.
Includes
Called from

xml_normalize_styles_master.xsl

Documentation
  • Created on: Apr 28, 2015; updated and extended after moving into MoEML project 2016-01
  • Author: mholmes
  • The purpose of this identity transform is to to rationalize and reorganize the use of CSS in a set of files. It enables the marshalling of all uses of @style in a TEI document, and can normalize and compare these to create a set of rendition elements to which elements previously bearing @style can be linked.
  • See source.
Includes
Called from

ajax_fragments_master.xsl

Documentation
  • Started on: January 5, 2016
  • Author: mholmes, jtakeda
  • This module is part of the static site build process for MoEML. It generates HTML fragments which are retrievable through AJAX calls in the static site.
  • The process is in three stages: first it retrieves all the fragments from key documents (bibl entries, person entries, orgs, location abstracts and all that); then it expands each fragment by adding information such as the number of mentions or citations or responsibilities associated with that item or person; then it passes the resulting TEI fragment to standard templates in a linked module for processing into XHTML5.
  • Source documents for the work are the standalone/complete XML documents produced at the first stage of the build process.
  • See source.
Includes
Called from

xml_standard_master.xsl

Documentation
  • Created on: March 23, 2016
  • Author: jtakeda and mholmes
  • This transformation is designed to generate a compliant TEI Standard file from any MoEML XML document. It is essentially an identity transform with special cases for every element and attribute not permitted in Simple. At the time of creation, Simple was still under steady development, so the schema will change and this file will need to be updated.
  • See source.
Called from

xml_simple_master.xsl

Documentation
  • Created on: June 2, 2015
  • Author: jtakeda and mholmes
  • This transformation, derived from mholmes’s earlier incarnation for MoEML v5, is designed to generate a compliant TEI Simple file from any MoEML XML document. It is essentially an identity transform with special cases for every element and attribute not permitted in Simple. At the time of creation, Simple was still under steady development, so the schema will change and this file will need to be updated.
  • See source.
Called from

xml_lite_master.xsl

Documentation
  • Created on: March 23, 2016
  • Author: jtakeda and mholmes
  • This transformation is designed to generate a compliant TEI Standard file from any MoEML XML document. It is essentially an identity transform with special cases for every element and attribute not permitted in Simple. At the time of creation, Simple was still under steady development, so the schema will change and this file will need to be updated.
  • See source.
Includes
Called from

kml_master.xsl

Documentation
  • Created on: March 15, 2016
  • Author: jtakeda and mholmes
  • This transformation, based off of of XQuery written by mholmes for MoEML v5, is designed to create individual and aggregate KML files from geographic data in MoEML’s TEI files.
  • It creates two full version of MoEML’s KML data, since zipping into a KMZ require slight changes in path structure.
  • See source.
Includes
Called from

xhtml_docs_master.xsl

Documentation
  • Created on: March 7, 2016.
  • Author: mholmes and jtakeda
  • This module is designed to process each of the standalone XML documents created in previous transformations into XHTML5 standalone documents.
  • See source.
Includes
Called from

xhtml_agas_master.xsl

Documentation
  • Started on: June 13, 2016.
  • Author: mholmes
  • This module is part of the static site build process for MoEML. It generates the HTML output page for the OpenLayers3-based version of the Agas Map.
  • See source.
Includes
Called from

rss_feeds_master.xsl

Documentation
  • Created on: 14th July 2016.
  • Author: mholmes
  • The purpose of this stylesheet is to generate RSS feeds for MoEML site content.
  • See source.
Includes
Called from

globals_module.xsl

captions_module.xsl

Documentation
  • Created on 2018-06-20 by an automated process.
  • Author: mholmes
  • This is a collection of captions and other useful strings used throughout TEI-to-HTML transformations.
  • See source.
Included by
Called from

xml_flatten_module.xsl

Documentation
  • Created on: Apr 4, 2016
  • Author: mholmes and jtakeda
  • The purpose of this module is to provide templates which flatten the original XML in our db/data repository. There are a number of reasons for doing this:
    • Our original XML has a range of difficult-to-process XIncludes (involving XPointer) which for the purposes of making our codebase available are more barriers than conveniences.
    • The original XML is in a folder structure which is arbitrarily nested, to suit the conveniences of encoders. We mitigate this by the use of private URI schemes for linking, but those schemes assume a flat folder structure, which we can provide in the context of the original eXist web application, but which does not accurately represent the reality of the actual source files. This means that (for instance) xml-model pointers to schemas are variable and will in many cases fail when the documents are moved to a flattened structure.
  • See source.
Included by

xml_utilities_module.xsl

Documentation
  • Started on: March 18, 2016.
  • Author: mholmes
  • This module is part of the static site build process for MoEML. It contains custom templates for processing TEI XML in particular ways required for special contexts, such as the removal of xml:id attributes or the suppression of elements that would be turned into links when these are to be output in contexts which are already going to be links. It also has some custom functions.
  • See source.
Included by

xml_category_lists_module.xsl

Documentation
  • Created on: Feb 29, 2016
  • Author: mholmes and jtakeda
  • This module creates XML versions of the category listings pages for each category in the document type taxonomy. It is part of the static build process. The XML documents it generates will later be converted to XHTML5.
  • Different types of document result in different tabular listings, so there is a lot of switching in the code below.
  • See source.
Included by

xml_id_listing_module.xsl

Documentation
  • Created in: June 2016
  • Authors: mholmes and jtakeda
  • This module generates the id listings page (A-Z index) in XML form.
  • See source.
Included by

xml_regnal_calendar_module.xsl

Documentation
  • This version created on: April 9, 2016
  • Authors: tlandels, jtakeda, and mholmes
  • This is a very slightly modified version of tlandels’ regnal_fods_to_tei.xsl, which was created in summer 2015. It processes the MoEML regnal_calendar spreadsheet (that has been flattened to a .fods file) and converts it to TEI.
  • See source.
Included by

xml_stats_module.xsl

Documentation
  • Created on: May 24, 2016
  • Author: jtakeda and mholmes
  • This transformation creates a TEI file of tables of various statistics on the MoEML site. It takes inspiration from mholmes’ stats.xql.
  • See source.
Included by

xml_static_documentation_module.xsl

Documentation
  • Created on: June 18, 2016
  • Author: jtakeda and mholmes
  • This module creates a TEI page that gives a list of all XSLT modules and masters that produce the static version of MoEML.
  • See source.
Included by

xml_praxis_index_module.xsl

Documentation
  • Created on: May 1, 2015
  • Author: jtakeda and mholmes
  • This transformation creates the index for MoEML’s praxis documentation. Each div of the documentation contains free-text terms as well as explicit references (using gi and att elements) to TEI entities.
  • See source.
Included by

xml_respTaxonomy_module.xsl

Documentation
  • Created on: August 18, 2016
  • Author: jtakeda
  • This transformation generates the documentation for MoEML’s responsibility taxonomy found in the teiHeader of PERS1.xml.
  • See source.
Included by

geojson_functions_module.xsl

Documentation
  • Created on: Dec 24, 2017
  • Author: mholmes
  • Module containing utility functions used to process GIS data, normally as part of GeoJSON generation or processing.
  • See source.
  • Regex for a single coordinate number.
  • See source.
  • Regex for a coordinate pair.
  • See source.
  • This template can be used to run tests of the functions by running the stylesheet against itself.
  • See source.
  • hcmc:polygonsOverlap takes two sequences of coordinates, which are assumed to be polygons, and checks whether they overlap or not. The coordinate sequences are in string format: lat,long lat,long lat,long (although the order of lat and long should not matter, as long as both sets of coordinates use the same order).
  • See source.
  • hcmc:getGeometry turns one or more geo elements into XML/JSON geometries.
  • See source.
  • hcmc:getGeometryType interrogates the geo element to find out what type of geometry it contains, based on its coordinate structure.
  • See source.
  • This function checks whether a sequence of coordinates (supplied as a string) is clockwise or not, and if it is, it reverses the order of the coords in the string.
  • See source.
  • The hcmc:isRingClockwise function simply checks whether a sequence of coordinates (supplied as a string) is clockwise or not.
  • See source.
  • hcmc:areaCalc does the area calculation for a single pair of coordinates.
  • See source.
  • This function calculates the radian of the supplied value.
  • See source.
Included by

xml_dates_module.xsl

Documentation
  • Created in: January 2016
  • Authors: jtakeda and mholmes
  • This module contains all the rather nasty calculations and transformations we need to do relating to dates, as well as rendering rules for dates. It depends on captions defined in captions.xsl. This is an updated version of mholmes’ original dates.xsl to account for the regularization of the year beginning of Julian dates to 1 January.
  • See source.
Includes
Included by

xml_citation_module.xsl

Documentation
  • Created in: January 2016
  • Author: mholmes and jtakeda
  • This module handles the generation of TEI bibl elements each of which contains a citation of the sending document arranged optimally for a particular style guide. These are stored in the notesStmt element in the header of the document, and later used to generate the popup Cite this document feature, as well as providing bibliographic information for the reference list of another document which cites the current one (a mol:bibl reference). This code is adapted from the XQuery developed for the MoEML eXist webapp.
  • See source.
Included by

xhtml_templates_module.xsl

Documentation
  • Created on: January 5, 2016
  • Author: mholmes and jtakeda
  • This module is part of the static site build process for MoEML. It provides generic templates which are used in the conversion of TEI XML to XHTML5 output.
  • Because this module is used as part of larger XSLT transformations involving multiple namespaces and target outputs, most of the templates use the xhtml5 mode attribute. It depends on the captions.xsl file which is also generated during the build, but it does not include that file because it will most likely be included by the root module which includes this one.
  • See source.
Includes
Included by

xhtml_functions_module.xsl

Documentation
  • Created on: February 2, 2016.
  • Author: mholmes and jtakeda
  • This module is part of the static site build process for MoEML. It provides a variety of functions which are used in the conversion of TEI XML to XHTML5 output.
  • These include both functions to construct standard parts of the web page output, such as menus and footers, and utility functions of various kinds.
  • Functions taking a $rootEl parameter would normally expect to receive a TEI element, in the case of a page being created from a complete TEI file; however, fragments such as people and bibl entries also get their own pages, so in these cases the $rootEl might be a person or a bibl element.
  • See source.
Includes
Included by

date_functions_module.xsl

Documentation
  • Created on: April 6, 2016
  • Authors: jtakeda and mholmes
  • This module contains the functions for handling dates that are used throughout the static build process.
  • The primary functions are: hcmc:julianMarToGregorian, hcmc:julianJanToGregorian, hcmc:dateRangeToText, and hcmc:dateRangeToHistorian. These functions are used throughout our processing throughout various stages of the build to translate dates and produce textual content for dates that have no text.
  • See source.
Included by

xhtml_appendix_module.xsl

Documentation
  • Started on: January 26, 2016.
  • Author: mholmes and jtakeda
  • This module is part of the static site build process for MoEML. It provides templates and functions for processing a document in appendix mode.
  • There are many elements in the text of a document which need to be processed twice: the obvious example is footnotes. In the regular processing pass (@mode=xhtml5) a clickable link in the form of a superscripted number is created; in the second pass (@mode=appendix), all notes are processed into a numbered list at the bottom of the page. Other content such as related documents/disambiguation information from the LINKS1 file is also included.
  • This module is intended to be included into higher-level modules which process TEI content into XHTML. It would be invoked as part of a second pass through the document content at the end of the regular processing pass.
  • See source.
Included by

Cite this page

MLA citation

The MoEML Team. Documentation for Static Build Code. The Map of Early Modern London, edited by Janelle Jenstad, U of Victoria, 20 Jun. 2018, mapoflondon.uvic.ca/static_code_documentation.htm.

Chicago citation

The MoEML Team. Documentation for Static Build Code. The Map of Early Modern London. Ed. Janelle Jenstad. Victoria: University of Victoria. Accessed June 20, 2018. http://mapoflondon.uvic.ca/static_code_documentation.htm.

APA citation

The MoEML Team. 2018. Documentation for Static Build Code. In J. Jenstad (Ed), The Map of Early Modern London. Victoria: University of Victoria. Retrieved from http://mapoflondon.uvic.ca/static_code_documentation.htm.

RIS file (for RefMan, EndNote etc.)

Provider: University of Victoria
Database: The Map of Early Modern London
Content: text/plain; charset="utf-8"

TY  - ELEC
A1  - The MoEML Team
ED  - Jenstad, Janelle
T1  - Documentation for Static Build Code
T2  - The Map of Early Modern London
PY  - 2018
DA  - 2018/06/20
CY  - Victoria
PB  - University of Victoria
LA  - English
UR  - http://mapoflondon.uvic.ca/static_code_documentation.htm
UR  - http://mapoflondon.uvic.ca/xml/standalone/static_code_documentation.xml
ER  - 

RefWorks

RT Web Page
SR Electronic(1)
A1 The MoEML Team
A6 Jenstad, Janelle
T1 Documentation for Static Build Code
T2 The Map of Early Modern London
WP 2018
FD 2018/06/20
RD 2018/06/20
PP Victoria
PB University of Victoria
LA English
OL English
LK http://mapoflondon.uvic.ca/static_code_documentation.htm

TEI citation

<bibl type="mla"><author><name ref="#TEAM1" type="org">The MoEML Team</name></author>. <title level="a">Documentation for Static Build Code</title>. <title level="m">The Map of Early Modern London</title>, edited by <editor><name ref="#JENS1"><forename>Janelle</forename> <surname>Jenstad</surname></name></editor>, <publisher>U of Victoria</publisher>, <date when="2018-06-20">20 Jun. 2018</date>, <ref target="http://mapoflondon.uvic.ca/static_code_documentation.htm">mapoflondon.uvic.ca/static_code_documentation.htm</ref>.</bibl>

Personography

Organizations