|
9 | 9 | <author>Lou Burnard</author>
|
10 | 10 | </titleStmt>
|
11 | 11 | <publicationStmt>
|
12 |
| - <p>Discussion draft</p> |
| 12 | + <p>As published on lb42.github.io</p> |
13 | 13 | </publicationStmt>
|
14 | 14 | <sourceDesc>
|
15 | 15 | <p>authored from scratch</p>
|
16 | 16 | </sourceDesc>
|
17 | 17 | </fileDesc>
|
18 | 18 | <revisionDesc>
|
| 19 | + <change when="2023-12-20">Minor changes for publication on lb42.github.io</change> |
19 | 20 | <change when="2018-01-04">Expanded and announced on TEI-L</change>
|
20 | 21 | <change when="2016-10-22">Uploaded for Council review</change>
|
21 | 22 | <change when="2016-10-21">Drafted first part on train from Paris to La Souterraine; then lost
|
|
58 | 59 | in the current source tree. And one with the value
|
59 | 60 | <val>http://example.com/superODDs/anotherSubset.xml</val> will go looking for it at the
|
60 | 61 | URL indicated. </p>
|
61 |
| - <p>It's important to understand that the resource indicated by the <att>source</att>s |
| 62 | + <p>It's important to understand that the resource indicated by the <att>source</att> |
62 | 63 | attribute must contain complete and explicit specification elements: <gi>elementSpec</gi>
|
63 | 64 | rather than <gi>elementRef</gi>, <gi>classSpec</gi> rather than <gi>classRef</gi> and so
|
64 | 65 | on. It may of course contain other TEI elements, but these will be ignored entirely in the
|
65 | 66 | construction of a schema. A file called <ident>p5subset.xml</ident>, provided as part of
|
66 | 67 | every TEI release, is an example of such a resource: it contains specifications for every
|
67 |
| - single TEI element, class, macro, and datatype, but nothing else much. If the |
68 |
| - <att>source</att> parameter is not supplied, the most recently available version of this |
| 68 | + single TEI element, class, macro, and datatype, but nothing else much. If a value for the |
| 69 | + <att>source</att> attribute is not specified, the most recently available version of this |
69 | 70 | file is what will be used during the processing of an ODD.</p>
|
70 | 71 | </div>
|
71 | 72 | <div>
|
72 | 73 | <head>Processing an ODD</head>
|
73 | 74 | <p>Let's look more closely at the way the TEI defines a very light weight schema called
|
74 | 75 | <ident>TEI Bare</ident>. Its schema specification element begins like this: <egXML
|
75 | 76 | xmlns="http://www.tei-c.org/ns/Examples">
|
76 |
| - <schemaSpec ident="tei_bare" xml:lang="en"> |
77 |
| - <moduleRef key="core" include="p list item label head author title"/> |
78 |
| - <moduleRef key="tei"/> |
79 |
| - <moduleRef key="header" |
80 |
| - include="teiHeader fileDesc titleStmt publicationStmt sourceDesc"/> |
81 |
| - <moduleRef key="textstructure" include="TEI text body div front back"/> |
82 |
| - <classSpec ident="att.global" mode="change" module="tei" type="atts"> |
83 |
| - <attList> |
84 |
| - <attDef ident="xml:space" mode="delete"/> |
85 |
| - <attDef ident="rend" mode="delete"/> |
86 |
| - <attDef ident="xml:base" mode="delete"/> |
87 |
| - </attList> |
88 |
| - </classSpec> |
89 |
| - <classSpec ident="att.fragmentable" mode="delete" module="tei" type="atts"/> |
90 |
| - </schemaSpec> |
91 |
| - </egXML> |
| 77 | + <schemaSpec ident="tei_bare" xml:lang="en"> |
| 78 | + <moduleRef key="core" include="p list item label head author title"/> |
| 79 | + <moduleRef key="tei"/> |
| 80 | + <moduleRef key="header" |
| 81 | + include="teiHeader fileDesc titleStmt publicationStmt sourceDesc"/> |
| 82 | + <moduleRef key="textstructure" include="TEI text body div front back"/> |
| 83 | + <classSpec ident="att.global" mode="change" module="tei" type="atts"> |
| 84 | + <attList> |
| 85 | + <attDef ident="xml:space" mode="delete"/> |
| 86 | + <attDef ident="rend" mode="delete"/> |
| 87 | + <attDef ident="xml:base" mode="delete"/> |
| 88 | + </attList> |
| 89 | + </classSpec> |
| 90 | + <classSpec ident="att.fragmentable" mode="delete" module="tei" type="atts"/> |
| 91 | +</schemaSpec> </egXML> |
92 | 92 | </p>
|
93 | 93 | <p>No <att>source</att> is specified, so declarations for the elements requested here will
|
94 | 94 | be taken from the current <ident>p5subset.xml</ident>. </p>
|
|
98 | 98 | specifications for two classes (<gi>classSpec</gi>), rather than references
|
99 | 99 | (<gi>classRef</gi>). The reference to the module <ident>tei</ident> brings with it
|
100 | 100 | specifications for most TEI classes, including these two. An ODD processor will therefore
|
101 |
| - have to resolve duplicate class specifications for the classes <ident>att.global</ident> |
102 |
| - and <ident>att.fragmentable</ident>. The required resolution is indicated by the value of |
| 101 | + have to deal with duplicate class specifications for the classes <ident>att.global</ident> |
| 102 | + and <ident>att.fragmentable</ident>. The resolution method required is indicated by the value of |
103 | 103 | the <att>mode</att> attribute: if this is <val>delete</val> then both declarations are to
|
104 | 104 | be ignored, and the class is therefore suppressed; if it is <val>change</val> then the two
|
105 | 105 | declarations are to be merged, with any part of it present in the second specification
|
106 | 106 | over-riding that in the first. In this case, the effect will be to suppress the three
|
107 | 107 | attributes mentioned. </p>
|
108 | 108 | <p>If you'd like to check that this ODD does what you expect, and you have oXygen installed
|
109 | 109 | with a recent version of the TEI Frameworks, just download the file
|
110 |
| - <ident>tei_bare.odd</ident>, and tell oXygen to apply the predefined transformation |
| 110 | + <ident>tei_bare.odd</ident> (you can get it from <ref target="https://github.com/TEIC/TEI/blob/dev/P5/Exemplars/tei_bare.odd">the TEI github repo</ref>), and tell oXygen to apply the predefined transformation |
111 | 111 | <ident>TEI ODD to HTML</ident> to it. This will produce a mini-manual for the TEI Bare
|
112 | 112 | customization in HTML format, near the beginning of which you should see a list of the
|
113 | 113 | elements the schema contains.
|
|
251 | 251 | the value for the <att>source</att> attribute on the <gi>schemaSpec</gi> defining our
|
252 | 252 | ODD. We could do the same thing (though I don't recommend it) even at the level of
|
253 | 253 | individual elements, by specifying a different version as source for an
|
254 |
| - <gi>elementSpec</gi>.</p><p>And just to make life a little simpler, there is an |
| 254 | + <gi>elementSpec</gi>.</p> |
| 255 | + <p>And just to make life a little simpler, there is an |
255 | 256 | officially recognized short cut built into the current ODD processing stylesheets:
|
256 | 257 | instead of the lengthy URL above, we could simply say <code>tei:3.0.0</code>. For
|
257 | 258 | example, supposing that for some strange reason we don't want to add the current
|
|
0 commit comments