| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<?oxygen RNGSchema="tei_odds.rng" type="xml"?> |
| 3 |
<TEI |
| 4 |
xmlns="http://www.tei-c.org/ns/1.0" |
| 5 |
xmlns:sch="http://purl.oclc.org/dsdl/schematron" |
| 6 |
xml:lang="en" n="freedict"> |
| 7 |
<teiHeader> |
| 8 |
<fileDesc> |
| 9 |
<titleStmt> |
| 10 |
<title>TEI Customization for the FreeDict project (basic), version 0.10</title> |
| 11 |
<respStmt> |
| 12 |
<resp>maintained by</resp> |
| 13 |
<name xml:id="bansp">Piotr Bański (bansp in the domain of o2.pl)</name> |
| 14 |
</respStmt> |
| 15 |
</titleStmt> |
| 16 |
<publicationStmt> |
| 17 |
<availability status="free"> |
| 18 |
<p>This file is released as part of the FreeDict package (http://freedict.org/). It |
| 19 |
is licensed under the GNU Public License version 2.0 or later.</p> |
| 20 |
</availability> |
| 21 |
</publicationStmt> |
| 22 |
<sourceDesc> |
| 23 |
<p>Initial version created with Roma, the ODD generator, version 3.6.</p> |
| 24 |
<p>This file was initially used for the Swahili-English dictionary. Later on, it got |
| 25 |
generalised as the basic schema for Freedict dictionaries encoded in TEI P5.</p> |
| 26 |
</sourceDesc> |
| 27 |
</fileDesc> |
| 28 |
</teiHeader> |
| 29 |
<text> |
| 30 |
<body> |
| 31 |
<head>ODD for FreeDict dictionaries, basic level of conformance.</head> |
| 32 |
<p>This is the ODD driver for generating schemas and documentation for dictionaries in the |
| 33 |
FreeDict project (see http://freedict.org/). It is meant primarily for dictionaries with |
| 34 |
very basic structure, but until higher-level ODDs are created, it will serve all TEI P5 |
| 35 |
dictionaries. For details, see a TEI Conference and Members' Meeting presentation by |
| 36 |
Piotr Bański and Beata Wójtowicz, which should be available from |
| 37 |
http://www.lib.umich.edu/spo/teimeeting09/program.html.</p> |
| 38 |
<list n="changelog" type="glossed"> |
| 39 |
<item><label>Version 0.10, <date when="2011-09-09">9 September 2011</date>, by <name>Piotr |
| 40 |
Bański</name></label>: Added the <gi>cell</gi>, <gi>row</gi>, and <gi>table</gi> elements, |
| 41 |
to handle front matter better.</item> |
| 42 |
<item><label>Version 0.9, <date when="2010-11-08">8 November 2010</date>, by <name>Piotr |
| 43 |
Bański</name></label>: |
| 44 |
<list type="bulleted"> |
| 45 |
<item>Added further Schematron constraints on the contents of <gi>tagUsage</gi>: |
| 46 |
when the <att>rend</att> on an ancestor is set to <val>anchored</val>, the |
| 47 |
<att>ana</att> attributes are traced to the FreeDict ontology interface (off |
| 48 |
by default, because it needs a checkout of the shared/ directory. See kha-deu |
| 49 |
for an example in action.</item> |
| 50 |
<item>Commented out the 'figures' module, until it is ever? needed.</item> |
| 51 |
<item>Removed <gi>tagUsage</gi> from the att.typed class added earlier in v. 0.8, |
| 52 |
because I decided to forcefully abuse the elements and attributes involved |
| 53 |
(mostly <gi>namespace</gi>, <att>n</att> and <att>rend</att>).</item> |
| 54 |
<item>TODO: extend this system for <gi>subcat</gi> elements.</item> |
| 55 |
</list> |
| 56 |
</item> |
| 57 |
<item><label>Version 0.8, <date when="2010-11-06">6 November 2010</date>, by <name>Piotr |
| 58 |
Bański</name></label>: |
| 59 |
<list type="bulleted"> |
| 60 |
<item>Added Schematron constraints on <gi>tagUsage</gi> (so this may be the |
| 61 |
beginning of the end of DTDs for Freedict, and consequently the xinclude |
| 62 |
extension will be able to go);</item> |
| 63 |
<item>added <gi>tagUsage</gi> to the att.typed class (need to distinguish between |
| 64 |
tags used in the <gi>gramGroup</gi> describing the source language forms from |
| 65 |
those describing the target language (inside <gi>cit</gi>);</item> |
| 66 |
<item>added <gi>gramGrp</gi> to the att.typed class (in order to be able to talk |
| 67 |
about 'discharged' grammatical properties, in elements that trigger agreement |
| 68 |
on other elements (think noun classes));</item> |
| 69 |
<item>Took out module "iso-fs" - I think it was here while I still thought of |
| 70 |
ontology interfaces being plugged more directly into dictionaries, not via |
| 71 |
tagUsage (or maybe I'm forgetting something now...).</item> |
| 72 |
</list> |
| 73 |
</item> |
| 74 |
<item><label>Version 0.7, <date when="2010-04-25">25 April 2010</date>, by <name>Piotr |
| 75 |
Bański</name></label>: Added the xinclude extension from the approoriate Roma |
| 76 |
template, changed it to be able to occur as a child of front (I can't validate |
| 77 |
xinclusions with xmllint if a DTD is used, so this is for the sake of DTDs |
| 78 |
only)</item> |
| 79 |
<item><label>Version 0.6, <date when="2010-04-24">24 April 2010</date>, by <name>Piotr Bański</name></label>: Added the "iso-fs" and "analysis" modules, the latter for the sake of @ana only...</item> |
| 80 |
<item><label>Version 0.5, <date when="2010-04-16">16 April 2010</date>, edited by <name>Piotr Bański</name></label> |
| 81 |
<list type="bulleted"> |
| 82 |
<item>Changed the responsibility type from the Roma-generated <gi>author</gi> to <gi>respStmt</gi> and called myself a maintainer.</item> |
| 83 |
<item>Made the changelog dates machine-readable.</item> |
| 84 |
<item>Added the linking module (merged changes by <name>Stuart Yeates</name>). This is to enable the <att>corresp</att> attributes.</item> |
| 85 |
</list> |
| 86 |
</item> |
| 87 |
<item><label>Version 0.4, <date when="2009-12-31">31 December 2009</date> by <name>Piotr Bański</name></label> |
| 88 |
<list type="bulleted"> |
| 89 |
<item>Commited to the Freedict CVS (still in version 0.3).</item> |
| 90 |
<item>Properly re-titled and described.</item> |
| 91 |
<item>Added the "figures" module, for tables in the front matter.</item> |
| 92 |
</list> |
| 93 |
</item> |
| 94 |
<item><label>Version 0.3, <date when="2008-12-30">30 December 2008</date> by <name>Piotr Bański</name></label> |
| 95 |
<list type="bulleted"> |
| 96 |
<item>Removed <gi>dictScrap</gi> and <gi>entryFree</gi> and the mysterious header |
| 97 |
elements that cause Sanity Checker warnings.</item> |
| 98 |
<item>Removed numbered divs (with a view towards tailoring this ODD for all |
| 99 |
FreeDict dictionaries).</item> |
| 100 |
</list> |
| 101 |
</item> |
| 102 |
</list> |
| 103 |
<schemaSpec ident="freedict-P5" docLang="en" prefix="tei_"> |
| 104 |
<moduleRef key="core"/> |
| 105 |
<elementSpec module="core" ident="teiCorpus" mode="delete"/> |
| 106 |
|
| 107 |
<moduleRef key="tei"/> |
| 108 |
|
| 109 |
<moduleRef key="header"/> |
| 110 |
<elementSpec module="header" ident="handNote" mode="delete"/> |
| 111 |
<elementSpec module="header" ident="typeNote" mode="delete"/> |
| 112 |
<elementSpec module="header" ident="tagUsage" mode="change"> |
| 113 |
<!-- <classes mode="replace"> |
| 114 |
<memberOf key="att.typed" mode="add"/> |
| 115 |
</classes> |
| 116 |
--> <constraintSpec ident="tagUsage_stuff" scheme="isoschematron"> |
| 117 |
<desc>Make sure that the content of gramGrp (of various sorts) corresponds to |
| 118 |
whatever is defined in tagUsage *if* it is defined there.</desc> |
| 119 |
<constraint> |
| 120 |
<sch:pattern id="gramGrp-tagUsage_conformance"> |
| 121 |
<sch:rule |
| 122 |
context="/tei:TEI/tei:text/tei:body//tei:*[local-name() eq 'entry' or local-name() eq 'sense']/tei:gramGrp/tei:*"> |
| 123 |
<sch:let name="loc_name" value="local-name()"/> |
| 124 |
<sch:assert |
| 125 |
test="not(/tei:TEI/tei:teiHeader/tei:encodingDesc/tei:tagsDecl/tei:namespace[@name eq 'http://www.tei-c.org/ns/1.0']/tei:tagUsage[@gi eq $loc_name]/tei:list/tei:item) or (. = /tei:TEI/tei:teiHeader/tei:encodingDesc/tei:tagsDecl/tei:namespace[@name eq 'http://www.tei-c.org/ns/1.0']/tei:tagUsage[@gi eq $loc_name]/tei:list/tei:item)" |
| 126 |
>The values of gramGrp/<sch:name/> must belong to the set identified |
| 127 |
in tagUsage for this element.</sch:assert> |
| 128 |
</sch:rule> |
| 129 |
<sch:rule |
| 130 |
context="/tei:TEI/tei:text/tei:body//tei:cit[@type eq 'trans']/tei:gramGrp/tei:*"> |
| 131 |
<!-- big question: is the context here stated properly? is it not too narrow now? --> |
| 132 |
<sch:let name="loc_name" value="local-name()"/> |
| 133 |
<sch:assert |
| 134 |
test="not(/tei:TEI/tei:teiHeader/tei:encodingDesc/tei:tagsDecl/tei:namespace[@name eq 'http://www.tei-c.org/ns/1.0'][@n eq 'equiv']/tei:tagUsage[@gi eq $loc_name]/tei:list/tei:item) or (. = /tei:TEI/tei:teiHeader/tei:encodingDesc/tei:tagsDecl/tei:namespace[@name eq 'http://www.tei-c.org/ns/1.0'][@n eq 'equiv']/tei:tagUsage[@gi eq $loc_name]/tei:list/tei:item)" |
| 135 |
>The values of cit[@type='trans']/gramGrp/<sch:name/> must belong to the set identified in |
| 136 |
tagUsage for this element, in the 'equiv' section.</sch:assert> |
| 137 |
</sch:rule> |
| 138 |
<sch:rule |
| 139 |
context="/tei:TEI/tei:text/tei:body//tei:*[local-name() eq 'entry' or local-name() eq 'sense']/tei:gramGrp/tei:gramGrp[@type='agr']/tei:*"> |
| 140 |
<sch:let name="loc_name" value="local-name()"/> |
| 141 |
<sch:assert |
| 142 |
test="not(/tei:TEI/tei:teiHeader/tei:encodingDesc/tei:tagsDecl/tei:namespace[@name eq 'http://www.tei-c.org/ns/1.0'][@n eq 'agr']/tei:tagUsage[@gi eq $loc_name]/tei:list/tei:item) or (. = /tei:TEI/tei:teiHeader/tei:encodingDesc/tei:tagsDecl/tei:namespace[@name eq 'http://www.tei-c.org/ns/1.0'][@n eq 'agr']/tei:tagUsage[@gi eq $loc_name]/tei:list/tei:item)" |
| 143 |
>The values of gramGrp[@type='agr']/<sch:name/> must belong to the set identified in |
| 144 |
tagUsage for this element, in the 'agr' section.</sch:assert> |
| 145 |
</sch:rule> |
| 146 |
</sch:pattern> |
| 147 |
</constraint> |
| 148 |
</constraintSpec> |
| 149 |
<constraintSpec ident="tagUsage-item-external" scheme="isoschematron"> |
| 150 |
<desc>if this is an anchored description, for each item check if it identifies a resource in the FreeDict ontology interface</desc> |
| 151 |
<constraint> |
| 152 |
<sch:pattern id="tagUsage_item_check"> |
| 153 |
<sch:rule context="tei:list/tei:item"> |
| 154 |
<sch:let name="targ_res" value="document(@ana)"/> |
| 155 |
<sch:assert test="if(ancestor::tei:tagsDecl[@rend eq 'anchored'] or ancestor::tei:namespace[@rend eq 'anchored'] or ancestor::tei:tagUsage[@rend eq 'anchored']) then (exists($targ_res) and string-length($targ_res)) else true()">The @ana attributes should identify a resource fragment in the FreeDict ontology interface.</sch:assert> |
| 156 |
</sch:rule> |
| 157 |
</sch:pattern> |
| 158 |
</constraint> |
| 159 |
</constraintSpec> |
| 160 |
</elementSpec> |
| 161 |
|
| 162 |
<moduleRef key="textstructure"/> |
| 163 |
<elementSpec module="textstructure" ident="div1" mode="delete"/> |
| 164 |
<elementSpec module="textstructure" ident="div2" mode="delete"/> |
| 165 |
<elementSpec module="textstructure" ident="div3" mode="delete"/> |
| 166 |
<elementSpec module="textstructure" ident="div4" mode="delete"/> |
| 167 |
<elementSpec module="textstructure" ident="div5" mode="delete"/> |
| 168 |
<elementSpec module="textstructure" ident="div6" mode="delete"/> |
| 169 |
<elementSpec module="textstructure" ident="div7" mode="delete"/> |
| 170 |
|
| 171 |
<moduleRef key="dictionaries"/> |
| 172 |
<elementSpec module="dictionaries" ident="dictScrap" mode="delete"/> |
| 173 |
<elementSpec module="dictionaries" ident="entryFree" mode="delete"/> |
| 174 |
<elementSpec ident="gramGrp" module="dictionaries" mode="change"> |
| 175 |
<classes mode="replace"> |
| 176 |
<memberOf key="model.entryPart"/> |
| 177 |
<memberOf key="model.entryPart.top"/> |
| 178 |
<memberOf key="model.gramPart"/> |
| 179 |
<memberOf key="att.lexicographic"/> |
| 180 |
<memberOf key="att.typed" mode="add"/> |
| 181 |
</classes> |
| 182 |
</elementSpec> |
| 183 |
|
| 184 |
<moduleRef key="figures" include="cell row table"/> |
| 185 |
|
| 186 |
<moduleRef key="analysis"/> |
| 187 |
<elementSpec module="analysis" ident="c" mode="delete"/> |
| 188 |
<elementSpec module="analysis" ident="cl" mode="delete"/> |
| 189 |
<elementSpec module="analysis" ident="interp" mode="delete"/> |
| 190 |
<elementSpec module="analysis" ident="interpGrp" mode="delete"/> |
| 191 |
<elementSpec module="analysis" ident="m" mode="delete"/> |
| 192 |
<elementSpec module="analysis" ident="pc" mode="delete"/> |
| 193 |
<elementSpec module="analysis" ident="phr" mode="delete"/> |
| 194 |
<elementSpec module="analysis" ident="s" mode="delete"/> |
| 195 |
<elementSpec module="analysis" ident="span" mode="delete"/> |
| 196 |
<elementSpec module="analysis" ident="spanGrp" mode="delete"/> |
| 197 |
<elementSpec module="analysis" ident="w" mode="delete"/> |
| 198 |
|
| 199 |
<moduleRef key="linking"/> |
| 200 |
<elementSpec module="linking" ident="ab" mode="delete"/> |
| 201 |
<elementSpec module="linking" ident="alt" mode="delete"/> |
| 202 |
<elementSpec module="linking" ident="altGrp" mode="delete"/> |
| 203 |
<elementSpec module="linking" ident="anchor" mode="delete"/> |
| 204 |
<elementSpec module="linking" ident="join" mode="delete"/> |
| 205 |
<elementSpec module="linking" ident="joinGrp" mode="delete"/> |
| 206 |
<elementSpec module="linking" ident="link" mode="delete"/> |
| 207 |
<elementSpec module="linking" ident="linkGrp" mode="delete"/> |
| 208 |
<elementSpec module="linking" ident="seg" mode="delete"/> |
| 209 |
<elementSpec module="linking" ident="timeline" mode="delete"/> |
| 210 |
<elementSpec module="linking" ident="when" mode="delete"/> |
| 211 |
<classSpec ident="att.global.linking" mode="change" type="atts" module="linking"> |
| 212 |
<attList> |
| 213 |
<attDef ident="synch" mode="delete"/> |
| 214 |
<attDef ident="sameAs" mode="delete"/> |
| 215 |
<attDef ident="copyOf" mode="delete"/> |
| 216 |
<attDef ident="next" mode="delete"/> |
| 217 |
<attDef ident="prev" mode="delete"/> |
| 218 |
<attDef ident="exclude" mode="delete"/> |
| 219 |
<attDef ident="select" mode="delete"/> |
| 220 |
</attList> |
| 221 |
</classSpec> |
| 222 |
|
| 223 |
<elementSpec xmlns:rng="http://relaxng.org/ns/structure/1.0" ident="include" |
| 224 |
ns="http://www.w3.org/2001/XInclude" mode="add"> |
| 225 |
<desc>The W3C XInclude element</desc> |
| 226 |
<classes> |
| 227 |
<!--<memberOf key="model.common"/>--> |
| 228 |
<memberOf key="model.pLike.front"/> |
| 229 |
<memberOf key="model.headerPart"/> |
| 230 |
</classes> |
| 231 |
<content> |
| 232 |
<rng:optional> |
| 233 |
<rng:ref name="fallback"/> |
| 234 |
</rng:optional> |
| 235 |
</content> |
| 236 |
<attList> |
| 237 |
<attDef ident="href"> |
| 238 |
<desc>pointer to the resource being included</desc> |
| 239 |
<datatype> |
| 240 |
<rng:ref name="data.pointer"/> |
| 241 |
</datatype> |
| 242 |
</attDef> |
| 243 |
<attDef ident="parse" usage="opt"> |
| 244 |
<defaultVal>xml</defaultVal> |
| 245 |
<valList type="closed"> |
| 246 |
<valItem ident="xml"/> |
| 247 |
<valItem ident="text"/> |
| 248 |
</valList> |
| 249 |
</attDef> |
| 250 |
<attDef ident="xpointer" usage="opt"> |
| 251 |
<datatype> |
| 252 |
<rng:text/> |
| 253 |
</datatype> |
| 254 |
</attDef> |
| 255 |
<attDef ident="encoding" usage="opt"> |
| 256 |
<datatype> |
| 257 |
<rng:text/> |
| 258 |
</datatype> |
| 259 |
</attDef> |
| 260 |
<attDef ident="accept" usage="opt"> |
| 261 |
<datatype> |
| 262 |
<rng:text/> |
| 263 |
</datatype> |
| 264 |
</attDef> |
| 265 |
<attDef ident="accept-charset" usage="opt"> |
| 266 |
<datatype> |
| 267 |
<rng:text/> |
| 268 |
</datatype> |
| 269 |
</attDef> |
| 270 |
<attDef ident="accept-language" usage="opt"> |
| 271 |
<datatype> |
| 272 |
<rng:text/> |
| 273 |
</datatype> |
| 274 |
</attDef> |
| 275 |
</attList> |
| 276 |
</elementSpec> |
| 277 |
</schemaSpec> |
| 278 |
</body> |
| 279 |
</text> |
| 280 |
</TEI> |