This is a tutorial for learning how to customize schemas using the “chain” feature of TEI ODD.

What is ODD Chain

There are two approaches to ODD chaining:

1. Inheritance (Vertical Chain)

References a parent ODD using the source attribute to inherit customizations.

TEI_allBaseODDDerivedODDFurtherderivation...

2. Combination (Horizontal Chain)

Uses specGrp and specGrpRef to integrate multiple ODDs.

HBeoaddyerODODDDIntegratedSchema

Folder Structure

tutor00obRi12uuEa--tiAlicplDsnbdhhtmmubbddccidM/haeaeeaetaaeeoon.Eesriaxir/ssrrmmts.reindtngeeiibbehmi.v/e-.e..vviirbdccdtoerso-rheennmaeooadd-pdsntddeeesrmmnd.sedpgm..dddeibbcopcelrh..i.viiedescntrhacenn/dc.sgmnttodeeso.lgmem.dd.dxl/pc..odsiomcdllmeodeprm#####digp##.leiIBDCGoedlBTnaeoedd.euhhsrm####n#######d.odiieeibeod.lsrviHBMXrGHGHGHIddodiOeneoaSaeTeTeTnddftDdaadiLtnMnMnMtdsiaDtdynTeeLeLeLeclnOie-drrrrrecDorrOtadadadmieDn-eDoftototoeprlDiecececdteieeaeldududuixnxltfxemmmaahaaeopsfefefetmemtdrarnrnrneprpenotototlildcidmamamafeteuntttiicsts0i0i0ilnutep1o1o2oegsoge'n'n'nstmrcsssfoiaGfffrmztrbodoiooiaiparernrmztoRsrtaineeaiaeabtofbvbgbainOoeorososDvdvavenDeete.sOeoDddDdODD

Prerequisites

  • Saxon (XSLT 2.0 processor)
  • TEI Stylesheets (installed at ../scripts/Stylesheets)

Build Method

cd/btuuitlodr.isahls

Generated Files

Source ODDRNGHTML
01-inheritance/base.oddoutput/base.rngoutput/base.html
01-inheritance/derived.oddoutput/derived.rngoutput/derived.html
02-chain/main.odd (after integration)output/combined.rngoutput/combined.html

Description of Each File

01-inheritance (Inheritance Type)

base.odd

The base ODD. Contains minimal modules and basic customizations.

<s/c<<<<<shmmmm!ceoooo-hmdddd-eauuuumSllllCapeeeeuSeRRRRspceeeeteffffocim>dkkkkieeeeeznyyyyat====t=""""i"thctobeeoenaiarxss"dete/e"sS>r/tc">rh/ue>cmtau"res"t/a>rt="TEI"source="tei:4.7.0">

derived.odd

A derived ODD that inherits from the TEI standard and adds additional customizations.

<<!s/-c<<<<s-h!e!e/ce-l-l<ehSm-e-ea/lepammt<aemeSDeCeta/tmacpenhnLtateSieltatitvtLnpfceSnSsDavtiteytpgptelvvaDsScieeee>fLaaletp>TdccillLf>eEeeeisIIi>cInlixidttts>tedideeets=mesentmm>t"entntyadntit=piinet=n="edddr"g"r=eeaiwnpe"nnrviod"ncttdettedl==dhefm"o""wS"iosicicmndmenethomieoddnhedot=d"etmedi"e>nesa=eoc=tro""=nh"""ud"ac//rsedwnh>>ctleigaeaeltenrteh"gatet>et="em"t""o>rT/diE>ebI=u""tceshoaunrgcee"="tei:4.7.0">

02-chain (Combination Type)

header-specs.odd

Defines header-related customizations with specGrp.

<s/p<see/pcl<eeGe!lcrm-eGpe-mrnepxtCn>mSutlpsS:etpicoedmc=ii>"dzheaentatid=oe"nrts-ictulsetSotmmitz"atmioodnes="">change">

text-specs.odd

Defines body-related customizations with specGrp.

<s/p<see/pcl<eeGe!lcrm-eGpe-mrnepxtCn>mSutlpsS:etpicoedmc=ii>"dzteaentxtit=o-"ncpsu"stmoomdiez=a"tcihoannsg"e>">

main.odd

Integrates multiple ODDs by referencing them with specGrpRef.

<s/c<<<<<<<shmmmm!ssceoooo-pphmdddd-eeeauuuuccmSllllRGGapeeeeerrSeRRRRfpppceeeeeRReffffreecieff>dkkkkneeeeecttnyyyyeaat====rr=""""sgg"thctpeeceeoeettoiarxc==m"detG""b/e"srhti>r/tpeen">raxe/ufdtd>cre-Storscum-phrseeeepcm"xesa/tc.">esor.dsnodtad#aldtr#etOhx=Det"Da-TsdcEeuIrs"-tcosumosiutzroacmteii=zo"anttsei"io/:n>4s."7/.>0">

Processing Flow

Inheritance Type

bidianenstrteeie.rvromemdoedoeddd.dddiooodioo2addd2addotdddotddde22de22drh(drh.bets.detxalmoxelmssalusrallex.rlix...xcv.x(cxse(exscosl=cdsloml"o.lmptmcpiepoiliimlebb:lpddedaa4eiee).ss.lrroee7+eiid...dvvdrh0r.eent"eoddgm)sd..lodrhlntvgmelinheritance)

Combination Type

HBeoaddyerODODDDIntegratedSchema

XSLTs Used

XSLTLocationRole
odd2odd.xslStylesheets/odds/ODD compilation (module expansion, inheritance resolution)
odd2relax.xslStylesheets/odds/RelaxNG schema generation
odd2html.xslStylesheets/odds/HTML documentation generation
merge-specs.xsl02-chain/specGrpRef expansion (custom-made)

References