Mapping ODD processing

From TEIWiki

Jump to: navigation, 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. The main goal is to document the steps in generating TEI schemas from a TEI customization ODD file. However, processing P5 itself is part of that process. And although not our primary goal, we hope to also provide documentation for generating custom documentation from a TEI customization ODD file.

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 upper-case term in the NAME column is the term we have agreed to use for the process in question in future documentation. There has been a great deal of confusion over nomenclature which impedes clear discussion of these steps, much of it resulting from the varied naming conventions in use in the Stylesheets code, so establishing a standard set of terms is important.

The bold stylesheet name in the XSLT FILES column is the one that is called; the others are the ones that the called one imports or includes.

1 Generate P5 guidelines-[lang].xml p5.xml 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/P5/Utilities/expand.xsl *Spec elements occur in specGrp and in div.
2 Generate P5 Subset p5.xml (generated above) p5subset.xml; p5subsetDoctored.xml Create a special cut-down version of P5 which has only divisions and their headers along with all the specs. Complete guidelines TEI/P5/Utilities/subset.xsl 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 beautiful p5subsetDoctored.xml, which is a hack for DTD production.
3 Generate JSON from p5subset p5subset.xml p5subset.json     Stylesheets/odds/odd2json.xsl, odds/teiodds.xsl, common/common_tagdocs.xsl, common/common_param.xsl, common/functions.xsl, common/i18n.xsl  
4 COMPILE ODD. Merge ODD customization with P5 source (SR calls this oddexpand; aka tangle aka compile aka process aka odd2odd aka flatten) ODD customization; p5subset file.processedodd (COMPILED ODD) The macrodef oddexpan is called, and that calls odd2odd.xsl with params p5subset.xml; ODD customization Stylesheets/odds/odd2odd.xsl
5 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.xml [See above] Wrinkle: either #1 or #2 might have components that point out to another source, which would then be imported. See Lou's tutorial [1]
6 COMPILED ODD TO RELAXNG Generate RELAX NG from processed ODD file.processedodd (output of rows above) file.rng Straight conversion, albeit complicated Stylesheets/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.
7 COMPILED ODD TO DTD Generate DTD from ODD file.processedodd file.[odd.]dtd Generate a DTD from the processed ODD file.   Stylesheets/odds/odd2dtd.xsl, odds/teiodds.xsl, odds/classatts.xsl, common/i18n.xsl, common/functions.xsl, common/common_param.xsl  
8 COMPILED ODD TO XSD file.processedodd file.xsd Generate RelaxNG from compiled ODD; convert with Trang to XSD; post-process XSD. file.processedodd; Trang. Ant task: xsd/build-to.xml; xsd/postprocess.xsl G
9 COMPILED ODD TO SCHEMATRON Extract Schematron file.processedodd file.isosch Generate a Schematron file with all rules correctly contextualized. Stylesheets/odds/extract-isosch.xsl Obsolete stuff with "sch" exists alongside iso-sch; former should be removed and latter renamed to "sch".
10 COMPILED ODD TO TEI LITE Generate TEI Lite from ODD file.processedodd ($tmpodd in teianttasks.xml; output of odds/odd2odd.xsl) TEI Lite XML document odd2lite.xsl Stylesheets/odds/odd2lite.xsl; odds/teiodds.xsl; classatts.xsl; common/verbatim.xsl; common/common.xsl; common.tagdocs.xsl; common/common_param.xsl; common/common_core.xsl; common/common_textstructure.xsl; common/common_header.xsl; common/common_linking.xsl; common/common_msdescription.xsl; common/common_figures.xsl; common/common_textcrit.xsl; common/common_gaiji.xsl; common/i18n.xsl; common/functions.xsl This is the prerequisite step for generating XHTML5, ePub and PDF documentation.
# A B C D E F G
# A B C D E F G
# A B C D E F G
Personal tools