Further adventures with ODDs

This post is mostly an aide-memoire, since how to do the ODD things I want to do is not very well documented in the TEI as such.

First challenge

I have an ODD which was produced by webRoma some time ago and which (naturally) uses the traditional « exclude » syntax. I want to convert this to the new « include » format and also to ensure that it won’t get any of the new elements added to P5 since it was first defined.  I proceeds as follows:

  1. I look at the source of my ODD and I see the comment Roma inserted in the <sourceDesc> « created by ROMA on Monday 21st June 2010 »
  2. I go to the list of releases on the TEI sourceforge site to find which release of P5 must have been in use at that date. Judging by the dates here, it is probably release 1.6 I want
  3. whichversionBuried away in the standard release of the TEI Stylesheets there is a a cool utility for converting an « exclusion » ODD into an « inclusion » one. It’s called tools/odd2nuodd.xsl and I run it like this:
saxon -p defaultSource=http://www.tei-c.org/Vault/P5/1.6.0/xml/tei/odd/p5subset.xml 
myOldODD.xml tools/odd2nuodd.xsl > myNewODD.xml

Note the inclusion of the 1.6.0 release number as the source directory to be used when the stylesheet starts looking for TEI definitions.

Second challenge

I have two or more new style ODDs and I want to compare their use of the TEI to assess their interoperability. So far, I only have an approximation to an answer for this, in part because I am too lazy to improve the scripts I hacked together for it last time, in part because it’s actually a rather ill-defined problem, and hence hard.

The approximation goes as follows:

  1. Run an XSL transformation on each ODD in turn, appending the results to a big text file listing element names and what happened to them in which ODD;
  2. Run a perl script (ouch) on the results of (1) to produce a summary table which starts like this:
<table>
<row role='label'><cell>Element</cell><cell>lodel</cell><cell>tei</cell><cell>sc
ore</cell></row>
<!-- 2 --><row><cell><ref target='http://www.tei-c.org/release/doc/tei-p5-doc/en
/html/ref-TEI.html'>TEI</ref></cell> <cell>change</cell> <cell>use</cell><cell>2
</cell></row>
<!-- 2 --><row><cell><ref target='http://www.tei-c.org/release/doc/tei-p5-doc/en
/html/ref-ab.html'>ab</ref></cell> <cell>use</cell> <cell>use</cell><cell>2</cel
l></row>
<!-- 2 --><row><cell><ref target='http://www.tei-c.org/release/doc/tei-p5-doc/en
/html/ref-abbr.html'>abbr</ref></cell> <cell>use</cell> <cell>use</cell><cell>2<
/cell></row>

OK, work is needed in this area. But it’s a start.

 

 

 


Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *