Mapping ODD processing

From TEIWiki
Revision as of 19:10, 15 November 2016 by Mholmes (talk | contribs)
Jump to navigation Jump to search

This page is intended to help us map out and document the various processing steps that are applied to ODD files, both in the current Stylesheets and in a future alternative ODD processor.


An italicized name in column A (NAME) indicates a step that is performed for building P5, but not necessarily for generating a customization.

The bold stylesheet name in column F (XSLT FILES) is the one that is called; the others are the ones that the called one imports.

NAME INPUT OUTPUT FORM PROCESSES INVOLVED PREREQS XSLT FILES COMMENTS
Generate P5 guidelines-[lang].xml p5.xml (TEI) Combine all chapter and spec files into a single document; processing instructions such as the generation of a table for chapter ST are handled. There must be a repodate.xml file containing an XML representation of the git repo state. [TEI]/Utilities/expand.xsl *Spec elements occur in specGrp and in div.
Generate [P5] Subset p5.xml (generated above) p5subset.xml (TEI); p5subsetDoctored.xml (TEI) Create a special cut-down version of P5 which has only divisions and their headers along with all the specs. Complete guidelines Utilities/subset.xsl; Utilities/dtdMagic.xsl (for Doctored) Why are all the div/head elements included? Why is a schemaSpec not created? Is it the case that schemaSpec always and only represents a customization of an existing source, which must eventually chain back to p5subset? If so, ODD is not a generic language; it depends on P5. This also generates the ugly p5subsetDoctored.xml, which is a hack for DTD production.
Generate JSON from p5subset p5subset.xml p5subset.json D E F G
Merge ODD customization with P5 source (SR calls this oddexpand) ODD customization; p5subset file.processedodd The macrodef oddexpan is called, and that calls odd2odd.xsl with params p5subset[Doctored].xml; ODD customization Stylesheets/odds/odd2odd.xsl The Doctored version of the subset should be used if creating DTDs; this happens in the P5 build, but not in the Stylesheets.
ODD chaining An ODD customization (#2) whose @source points to another customization (#1) file.processedodd #1 undergoes merging with p5subset.xml, then #2 undergoes merging with the result of that. Both ODDs and p5subset[Doctored].xml [See above]
Generate RelaxNG from processed ODD file.processedodd (output of rows above) file.rng Straight conversion, albeit complicated odds/odd2relax.xsl; odds/teiodds.xsl; odds/classatts.xsl; common/functions.xsl; common/i18n.xsl; common/common_param.xsl The output is used to generate rnc and xsd using trang.
Extract Schematron file.processedodd file.sch Generate a Schematron file with all rules correctly contextualized. odds/extract-isosch,xsl Obsolete stuff with "sch" exists alongside iso-sch; former should be removed and latter renamed to "sch".
Generate DTD from ODD B C D E F G
A B C D E F G