Skip to content

Commit 1ce0ba7

Browse files
committed
Read schema customizations
1 parent cf52039 commit 1ce0ba7

33 files changed

+5376
-103
lines changed

Diff for: data/tei-epidoc-full.odd

+469
Large diffs are not rendered by default.

Diff for: data/tei_all.odd

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<TEI xml:lang="en"
3+
xmlns="http://www.tei-c.org/ns/1.0"
4+
xmlns:rng="http://relaxng.org/ns/structure/1.0">
5+
<teiHeader>
6+
<fileDesc>
7+
<titleStmt>
8+
<title>TEI with maximal setup</title>
9+
<author>Sebastian Rahtz</author>
10+
</titleStmt>
11+
<publicationStmt>
12+
<availability status="free">
13+
<p>This template file is freely available and you are
14+
hereby authorised to copy, modify, and redistribute it in
15+
any way without further reference or permissions.</p>
16+
<p>When making such modifications, you are strongly
17+
recommended to change the present text to include an
18+
accurate statement of the licencing conditions applicable
19+
to your modified text.</p>
20+
</availability>
21+
</publicationStmt>
22+
<sourceDesc>
23+
<p>Written from scratch.</p>
24+
</sourceDesc>
25+
</fileDesc>
26+
</teiHeader>
27+
<text>
28+
<body>
29+
<head>TEI Complete</head>
30+
<p>This TEI customization describes a schema that includes
31+
<emph>all</emph> of the TEI (P5) modules. This is a very useful
32+
starting place for manually creating your own customizations
33+
— it is much easier to delete the modules you do not
34+
want than to add the modules you do. Furthermore this
35+
customization often proves helpful for testing TEI
36+
software.</p>
37+
<p>However, this particular TEI customization is <emph>not
38+
recommended</emph> for actual use for encoding documents. It
39+
produces schemas and reference documentation that will be much
40+
larger, and include many more elements, than almost anyone could
41+
conceivably ever need. Tempting though it may be simply to have
42+
absolutely everything, and <q>just ignore</q> elements not
43+
required, experience has shown that their presence makes the
44+
documentation harder to read and use, and makes a schema that is
45+
far more lax than desired.</p>
46+
<schemaSpec ident="tei_all" start="TEI teiCorpus">
47+
<moduleRef key="tei"/> <!-- required -->
48+
<moduleRef key="core"/> <!-- required -->
49+
<moduleRef key="analysis"/>
50+
<moduleRef key="certainty"/>
51+
<moduleRef key="corpus"/>
52+
<moduleRef key="dictionaries"/>
53+
<moduleRef key="drama"/>
54+
<moduleRef key="figures"/>
55+
<moduleRef key="gaiji"/>
56+
<moduleRef key="header"/> <!-- required -->
57+
<moduleRef key="iso-fs"/>
58+
<moduleRef key="linking"/>
59+
<moduleRef key="msdescription"/>
60+
<moduleRef key="namesdates"/>
61+
<moduleRef key="nets"/>
62+
<moduleRef key="spoken"/>
63+
<moduleRef key="textcrit"/>
64+
<moduleRef key="textstructure"/> <!-- required -->
65+
<moduleRef key="transcr"/>
66+
<moduleRef key="verse"/>
67+
68+
<moduleRef key="tagdocs"/>
69+
70+
</schemaSpec>
71+
</body>
72+
</text>
73+
</TEI>

Diff for: data/tei_allPlus.odd

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<TEI xml:lang="en"
3+
xmlns:xi="http://www.w3.org/2001/XInclude"
4+
xmlns="http://www.tei-c.org/ns/1.0"
5+
xmlns:rng="http://relaxng.org/ns/structure/1.0">
6+
<teiHeader>
7+
<fileDesc>
8+
<titleStmt>
9+
<title>TEI with maximal setup, plus external additions</title>
10+
<author>Sebastian Rahtz</author>
11+
</titleStmt>
12+
<publicationStmt>
13+
<availability status="free">
14+
<p>This template file is freely available and you are hereby
15+
authorised to copy, modify, and redistribute it in any way without
16+
further reference or permissions.</p>
17+
<p>When making such modifications, you are strongly recommended to
18+
change the present text to include an accurate statement of the
19+
licencing conditions applicable to your modified text.</p>
20+
</availability>
21+
</publicationStmt>
22+
<sourceDesc>
23+
<p>This digital file is the original, although it is heavily based on the
24+
file tei_all.odd.</p>
25+
</sourceDesc>
26+
</fileDesc>
27+
</teiHeader>
28+
<text>
29+
<body>
30+
<head>TEI Complete, Plus</head>
31+
<p>This TEI customization describes a schema that includes
32+
<emph>all</emph> of the TEI (P5) modules, and all of the recommended
33+
external schemas. This is a very useful starting place for manually
34+
creating your own customizations — it is much easier to
35+
delete the modules you do not want than to add the modules you do.
36+
Furthermore this customization often provides helpful for testing TEI
37+
software. </p>
38+
<p>However, this particular TEI customization is <emph>not
39+
recommended</emph> for actual use for encoding documents. It produces
40+
schemas and reference documentation that will be much larger, and
41+
include many more elements, than almost anyone could conceivably ever
42+
need. Tempting though it may be simply to have absolutely everything,
43+
and <q>just ignore</q> elements not required, experience has shown that
44+
their presence makes the documentation harder to read and use, and makes
45+
a schema that is often more lax than desired.</p>
46+
47+
<schemaSpec ident="tei_allPlus" prefix="tei_" start="TEI teiCorpus">
48+
<moduleRef key="tei"/> <!-- required -->
49+
<moduleRef key="core"/> <!-- required -->
50+
<moduleRef key="analysis"/>
51+
<moduleRef key="certainty"/>
52+
<moduleRef key="corpus"/>
53+
<moduleRef key="declarefs"/>
54+
<moduleRef key="dictionaries"/>
55+
<moduleRef key="drama"/>
56+
<moduleRef key="figures"/>
57+
<moduleRef key="gaiji"/>
58+
<moduleRef key="header"/> <!-- required -->
59+
<moduleRef key="iso-fs"/>
60+
<moduleRef key="linking"/>
61+
<moduleRef key="msdescription"/>
62+
<moduleRef key="namesdates"/>
63+
<moduleRef key="nets"/>
64+
<moduleRef key="spoken"/>
65+
<moduleRef key="tagdocs"/>
66+
<moduleRef key="textcrit"/>
67+
<moduleRef key="textstructure"/> <!-- required -->
68+
<moduleRef key="transcr"/>
69+
<moduleRef key="verse"/>
70+
71+
72+
<xi:include href="tei_svg.odd"
73+
xpointer="xmlns(t=http://www.tei-c.org/ns/1.0)xpointer(//t:moduleRef[@url])">
74+
<xi:fallback> ERROR: cannot locate ODD changes for SVG </xi:fallback>
75+
</xi:include>
76+
77+
<xi:include href="tei_math.odd"
78+
xpointer="xmlns(t=http://www.tei-c.org/ns/1.0)xpointer(//t:moduleRef[@url]|//t:elementSpec[@ident='formula'])">
79+
<xi:fallback> ERROR: cannot locate ODD changes for MathML </xi:fallback>
80+
</xi:include>
81+
82+
<elementSpec ident="egXML" mode="change" module="tagdocs"
83+
ns="http://www.tei-c.org/ns/Examples">
84+
<content>
85+
<oneOrMore xmlns="http://relaxng.org/ns/structure/1.0">
86+
<choice>
87+
<text/>
88+
<ref name="macro.anyThing"/>
89+
</choice>
90+
</oneOrMore>
91+
</content>
92+
</elementSpec>
93+
94+
<macroSpec ident="macro.anyThing" mode="add">
95+
<content>
96+
<?NameList?>
97+
</content>
98+
</macroSpec>
99+
100+
<macroSpec mode="change" ident="macro.anyXML">
101+
<content>
102+
<element xmlns="http://relaxng.org/ns/structure/1.0">
103+
<anyName>
104+
<except>
105+
<nsName ns="http://www.tei-c.org/ns/1.0"/>
106+
<nsName ns="http://www.w3.org/1998/Math/MathML"/>
107+
<nsName ns="http://www.w3.org/2000/svg"/>
108+
<name ns="http://www.tei-c.org/ns/Examples">egXML</name>
109+
</except>
110+
</anyName>
111+
<zeroOrMore>
112+
<attribute>
113+
<anyName/>
114+
</attribute>
115+
</zeroOrMore>
116+
<zeroOrMore>
117+
<choice>
118+
<text/>
119+
<ref name="macro.anyXML"/>
120+
</choice>
121+
</zeroOrMore>
122+
</element>
123+
</content>
124+
</macroSpec>
125+
126+
</schemaSpec>
127+
</body>
128+
</text>
129+
</TEI>

Diff for: data/tei_bare.odd

+146
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
3+
<teiHeader>
4+
<fileDesc>
5+
<titleStmt>
6+
<title>TEI Absolutely Bare</title>
7+
<author>Laurent Romary</author>
8+
<editor xml:id="sbauman.emt">Syd Bauman</editor>
9+
<editor xml:id="LB">Lou Burnard</editor>
10+
<editor xml:id="SR">Sebastian Rahtz</editor>
11+
</titleStmt>
12+
<publicationStmt>
13+
<availability status="free">
14+
<p>This template file is freely available and you are hereby
15+
authorised to copy, modify, and redistribute it in any way without
16+
further reference or permissions.</p>
17+
<p>When making such modifications, you are strongly recommended to
18+
change the present text to include an accurate statement of the
19+
licencing conditions applicable to your modified text.</p>
20+
</availability>
21+
</publicationStmt>
22+
<sourceDesc>
23+
<p>Initially created on <date when="2006-10-12T05:24:41">Thursday 12th
24+
October 2006</date> by the form at
25+
http://www.tei-c.org.uk/Roma/.</p>
26+
</sourceDesc>
27+
</fileDesc>
28+
<revisionDesc>
29+
<change when="2011-03-26" who="#SR">rewrite as new-style ODD </change>
30+
<change when="2007-08-12" who="#LB">Removed further elements added
31+
since this ODD was first created </change>
32+
<change when="2007-04-09" who="#LB">Added prose and reorganized
33+
structure to make it more document-like; changed deletion of attribute
34+
decls into deletion of att.declaring class; add deletes for elements
35+
email and floatingText added to P5 since this ODD was first created;
36+
considered but did not implement removal of all irrelevant datatype specs...</change>
37+
<change when="2006-10-14" who="#sbauman.emt"> Made valid: <list><item>removed empty <att>prefix</att> attribute</item><item>added required <att>type</att> attribute to
38+
<gi>classSpec</gi>s</item></list><!--. <note>Sebastian had also made the above changes.</note> -->Also
39+
removed extraneous <gi>altIdent</gi> elements, improved
40+
<gi>sourceDesc</gi>, changed the <att>ident</att> of <gi>schemaSpec</gi>
41+
to match the filename, and added this revision description. </change>
42+
</revisionDesc>
43+
</teiHeader>
44+
<text>
45+
<!-- <front>
46+
<divGen type="toc"/>
47+
</front>-->
48+
<body>
49+
<p>This customization creates a TEI schema with the bare minimum of tags
50+
to make a recognizable document. It combines the four basic modules, but
51+
removes most of the available elements and changes several attribute classes.</p>
52+
<div>
53+
<head>Basic text structure</head>
54+
<p>In this very simple schema, a document may contain <gi>front</gi>,
55+
<gi>body</gi> and <gi>back</gi> elements as in standard TEI. However,
56+
within these, only the following elements are permitted:
57+
<specList><specDesc key="div"/><specDesc key="head"/><specDesc key="list"/><specDesc key="p"/></specList>
58+
</p>
59+
<p>The <gi>list</gi> element may contain a <gi>head</gi> followed by a
60+
sequence either of <gi>label</gi>-<gi>item</gi> pairs, or of
61+
<gi>item</gi> elements alone. </p>
62+
<p>The <gi>item</gi> and <gi>p</gi> elements have the same structure:
63+
either may contain just text, or a mixture of text with
64+
<gi>list</gi>, or <gi>title</gi> elements.</p>
65+
<p>Similarly, the <gi>div</gi> element may contain a <gi>head</gi>,
66+
followed by a nested <gi>div</gi>, or one or more <gi>p</gi> elements.
67+
</p>
68+
<p>The <att>version</att> attribute on the <gi>TEI</gi> element is
69+
removed, as is the <att>level</att> attribute on the <gi>title</gi>
70+
element. Other attributes are also removed as a consequence of the
71+
class modifications described below.</p>
72+
<p>The following specification group deletes the unwanted attributes:
73+
<specGrp xml:id="bodyfixes">
74+
<elementSpec ident="title" mode="change" module="core"><attList><attDef ident="level" mode="delete"/></attList></elementSpec>
75+
<elementSpec ident="TEI" mode="change" module="textstructure"><attList><attDef ident="version" mode="delete"/></attList></elementSpec>
76+
</specGrp>
77+
</p>
78+
</div>
79+
<div>
80+
<head>Header structure</head>
81+
<p>A much simplified version of the TEI Header is defined, again by
82+
the deletion of many elements. For validity, all that is required
83+
within it is the <gi>fileDesc</gi>, which contains only the following elements:
84+
<specList><specDesc key="titleStmt"/><specDesc key="publicationStmt"/><specDesc key="sourceDesc"/></specList>
85+
</p>
86+
<p>Within the <gi>titleStmt</gi> only a <gi>title</gi> is permitted;
87+
within the other two elements only a <gi>p</gi> is permitted.
88+
The <att>default</att> attribute on the <gi>sourceDesc</gi> element is
89+
also removed.
90+
<specGrp xml:id="hdrfixes">
91+
<elementSpec ident="sourceDesc" mode="change" module="header">
92+
<attList><attDef ident="default" mode="delete"/></attList>
93+
</elementSpec>
94+
</specGrp>
95+
</p>
96+
</div>
97+
<div>
98+
<head>Class modifications</head>
99+
<p>Finally three of the TEI attribute
100+
classes are simplified. The attributes xml:space, rend, and xml:base
101+
are removed from the att.global class, so that this now makes
102+
available to all elements only the following attributes:
103+
<att>xml:id</att>, <att>n</att>, and
104+
<att>xml:lang</att>.
105+
</p>
106+
<p>Three un-needed attributes are removed from the att.divLike class so that
107+
the <gi>div</gi> element inherits from it only
108+
the following attributes: <att>xml:id</att>,
109+
<att>n</att>,
110+
<att>xml:lang</att>.
111+
The attribute class <ident>att.declaring</ident> is deleted
112+
completely, so that none of its members inherit the <att>decls</att>
113+
attribute defined in the unmodified TEI.</p>
114+
<specGrp xml:id="classmods">
115+
<classSpec ident="att.global" mode="change" module="tei" type="atts">
116+
<attList>
117+
<attDef ident="xml:space" mode="delete"/>
118+
<attDef ident="rend" mode="delete"/>
119+
<attDef ident="xml:base" mode="delete"/>
120+
</attList>
121+
</classSpec>
122+
<classSpec ident="att.fragmentable" mode="delete" module="tei" type="atts"/>
123+
<classSpec ident="att.divLike" mode="change" module="tei" type="atts">
124+
<attList>
125+
<attDef ident="org" mode="delete"/>
126+
<attDef ident="sample" mode="delete"/>
127+
</attList>
128+
</classSpec>
129+
<classSpec ident="att.declaring" mode="delete" module="tei" type="atts"/>
130+
</specGrp>
131+
</div>
132+
<div>
133+
<head>Formal declaration</head>
134+
<schemaSpec ident="tei_bare" xml:lang="en">
135+
<moduleRef key="core" include="p list item label head author title"/>
136+
<moduleRef key="tei"/>
137+
<moduleRef key="header" include="teiHeader fileDesc titleStmt publicationStmt sourceDesc"/>
138+
<moduleRef key="textstructure" include="TEI text body div front back"/>
139+
<specGrpRef target="#classmods"/>
140+
<specGrpRef target="#bodyfixes"/>
141+
<specGrpRef target="#hdrfixes"/>
142+
</schemaSpec>
143+
</div>
144+
</body>
145+
</text>
146+
</TEI>

Diff for: data/tei_corpus.odd

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<TEI xmlns="http://www.tei-c.org/ns/1.0"
3+
xmlns:rng="http://relaxng.org/ns/structure/1.0"
4+
xml:lang="en" >
5+
<teiHeader>
6+
<fileDesc>
7+
<titleStmt>
8+
<title>TEI for Linguistic Corpora</title>
9+
<author>Sebastian Rahtz</author>
10+
</titleStmt>
11+
<publicationStmt>
12+
<availability status="free">
13+
<p>This template file is freely available and you are
14+
hereby authorised to copy, modify, and redistribute it in
15+
any way without further reference or permissions.</p>
16+
<p>When making such modifications, you are strongly
17+
recommended to change the present text to include an
18+
accurate statement of the licencing conditions applicable
19+
to your modified text.</p>
20+
</availability>
21+
</publicationStmt>
22+
<sourceDesc>
23+
<p>Written from scratch.</p>
24+
</sourceDesc>
25+
</fileDesc>
26+
</teiHeader>
27+
<text>
28+
<body>
29+
<head>TEI Corpus</head>
30+
<p>This TEI customization file includes the minimum TEI modules
31+
likely to be needed in the creation of linguistic corpora.</p>
32+
<schemaSpec ident="tei_corpus" start="TEI teiCorpus">
33+
<!-- required modules -->
34+
<moduleRef key="header"/>
35+
<moduleRef key="core"/>
36+
<moduleRef key="tei"/>
37+
<moduleRef key="textstructure"/>
38+
<!-- optional modules -->
39+
<moduleRef key="corpus"/>
40+
<moduleRef key="namesdates"/>
41+
<moduleRef key="linking"/>
42+
<!-- required to avoid Sanity Checker complaint -->
43+
<elementSpec ident="handNote" mode="delete" module="header"/>
44+
</schemaSpec>
45+
</body>
46+
</text>
47+
</TEI>

0 commit comments

Comments
 (0)