Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sarcanon committed Oct 15, 2019
2 parents 4b1dac5 + 592b3e2 commit e9ce874
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 113 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
__pycache__
__pycache__
.DS_Store
EpiDocXSL.xsl
EpiDocXSL.xpr
tests/OxyResults/
tests/data/source-new/
84 changes: 84 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# EpiDoc Reference Stylesheets

## README.txt for EpiDoc/Stylesheets

### What it is:

XSLT for transformation of EpiDoc XML files into HTML or text versions in Leiden. Includes various XML files containing parameters and other options.

To cite these stylesheets in a conventional bibliography, please include the following information:

Tom Elliott, Zaneta Au, Gabriel Bodard, Hugh Cayless, Carmen Lanz, Faith Lawrence, Scott Vandebilt, Raffaele Viglianti, et al. (2008-2019), EpiDoc Example Stylesheets (version 9). Available: <https://github.com/EpiDoc/Stylesheets>

### License:

These scripts are copyright Zaneta Au, Gabriel Bodard and all other contributors. See LICENSE.txt for license details.

### Technical requirements:

These scripts are written in XSLT 2.0 and may be transformed using any conformant XSLT processor. (Tested with Saxon-HE 9.6.0.5.)

### How to obtain the stylesheets:

Three methods:

1. check out from the EpiDoc Git repository. On a Mac or Linux machine with Git installed, simply create a directory into which you want to check out the xslt, and then on the terminal/command-line enter:

~~~
git clone https://github.com/EpiDoc/Stylesheets.git your_directory
~~~

2. Download the latest development version directly from: <https://github.com/EpiDoc/Stylesheets/archive/master.zip>

3. download the latest packaged, stable release from the Sourceforge repository at https://sourceforge.net/projects/epidoc/files/epidoc-xsl/

### How to use it:

XSLT may be run on an individual EpiDoc XML file, creating a single file output (e.g. via a command-line Saxon call or an Oxygen transformation scenario) or batch-run upon a large collection of files via some other process (e.g. an Oxygen project, set of batch files, etc.). Call the start-edition.xsl stylesheet to create a HTML version of the output (this XSL calls both generic and specialized files needed), or start-txt.xsl to create a text-only version of the text output.

Transformations are parameterised so that they may be used by different projects with only a change in local parameters, the scripts themselves being identical for all users. Change the parameters either by (a) changing the global-parameters.xml in your local copy (please do *not* commit these changes to SVN), or (b) setting local variables in your Saxon command-line, Oxygen scenario, etc.

The parameters currently defined include:

$internal-app-style:
Generate a paragraph of apparatus immediately below
the text unless value is "none" (default); via equivalent of
TEI "Parallel Segmentation" apparatus encoding.
Supported values include: 'ddbdp' (generate very rich
apparatus from tei:app, tei:subst, tei:choice, tei:hi etc.
elements in the text); 'iospe' (generate simple apparatus
from tei:choice and children in text only).
$external-app-style:
Variant ways to interpret the markup in `div[@type='apparatus']`,
assumed to follow equivalent of TEI "Location-Referenced"
apparatus encoding. The only value supported is 'iospe',
which processes bibliography richly.
$css-loc
Default value is '../xsl/global.css'.
Path of CSS file referenced in the resulting HTML file.
$docroot
Default value is '../output/data'
$edition-type:
Values supported are 'interpretive' (default) and 'diplomatic' (prints
edition in uppercase, no restored, corrected, expanded characters, etc.)
$edn-structure
Values supported are 'default' (no metadata), 'inslib', 'iospe'
$hgv-gloss
Value is '../../../xml/idp.data/trunk/HGV_trans_EpiDoc/glossary.xml'.
Location of HGV glossary file relative to the current file.
Used by Papyrological Navigator only.
$leiden-style:
Values supported include 'panciera' (default), 'ddbdp', 'dohnicht',
'edh-web' (and 'edh-itx', 'edh-names'), 'ila', 'london',
'petrae', 'rib', 'seg', and 'sammelbuch'. These change minor
variations in local Leiden usage; brackets for corrected text,
display of previously read text, illegible characters, etc.
$line-inc:
default value = 5, may be locally defined to any integer value
$topNav
values are 'default' and 'ddbdp'
$verse-lines:
values are 'off' (default), and 'on' (when a text of section of
text is tagged using <lg> and <l> elements [instead of <ab>] then
edition is formatted and numbered in verse lines rather than
epigraphic lines)
112 changes: 0 additions & 112 deletions README.txt

This file was deleted.

5 changes: 5 additions & 0 deletions htm-teiab.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<xsl:param name="parm-leiden-style" tunnel="yes" required="no"></xsl:param>
<xsl:param name="parm-edition-type" tunnel="yes" required="no"></xsl:param>
<div class="textpart">
<!-- transfers the @xml:lang attribute of the ab element to the textpart-->
<!-- a div[@type='textpart'] is created for each ab element, independant of the textpart / ab hierarchical structure -->

<!-- Found in htm-tpl-lang.xsl -->
<xsl:call-template name="attr-lang"/>
<span class="ab">
<xsl:if test="$parm-leiden-style='iospe'">
<xsl:variable name="div-loc">
Expand Down

0 comments on commit e9ce874

Please sign in to comment.