Began work on customizing the schema
Posted by mholmes on 14 Aug 2007 in Activity log
I've begun adding more blocks to the ODD file used to generate the schema, to restrict the range of values available for specific attributes. It took a lot of experimentation to figure out exactly how to do this; the only really useful documentation I was able to find was this, but even then I had to hack around at the values of the @mode attribute (they have to be "change" on the <elementSpec> tag and "replace" on the <attDef> tag, for some reason). This is what I have so far (both blocks are simplifications, as a proof of concept):
<elementSpec module="core" mode="change" ident="hi">
<attList>
<attDef ident="rend" mode="replace" usage="req">
<valList type="closed">
<valItem ident="bold">
<gloss>Rendered in bold.</gloss>
</valItem>
<valItem ident="italic">
<gloss>Rendered in italics</gloss>
</valItem>
<valItem ident="strikethrough">
<gloss>Rendered with a horizontal line through the middle of the text.</gloss>
</valItem>
<valItem ident="underline">
<gloss>Rendered with a line below the text.</gloss>
</valItem>
<valItem ident="foreign">
<gloss>Rendered in a distinct manner to highlight the fact that this word is not in the main language of the text.</gloss>
</valItem>
</valList>
</attDef>
</attList>
</elementSpec>
<elementSpec mode="change" ident="TEI">
<attList>
<attDef ident="rend" mode="replace" usage="req">
<valList type="closed">
<valItem ident="article">
<gloss>This is a full journal article.</gloss>
</valItem>
<valItem ident="review">
<gloss>This is a review of a publication.</gloss>
</valItem>
<valItem ident="editorial">
<gloss>This is editorial content.</gloss>
</valItem>
</valList>
</attDef>
</attList>
</elementSpec>