Skip to content

Commit 7225602

Browse files
committed
odd: adjust rules for span, phr, pc, w
1 parent ee7edf7 commit 7225602

File tree

2 files changed

+145
-15
lines changed

2 files changed

+145
-15
lines changed

802_tei_odd/out/shawi_corpus.rng

+103-14
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xmlns:xlink="http://www.w3.org/1999/xlink"
66
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
77
ns="http://www.tei-c.org/ns/1.0"><!--
8-
Schema generated from ODD source 2025-03-06T09:12:53Z. .
8+
Schema generated from ODD source 2025-03-07T08:51:47Z. .
99
TEI Edition: P5 Version 4.7.0. Last updated on 16th November 2023, revision e5dd73ed0
1010
TEI Edition Location: https://www.tei-c.org/Vault/P5/4.7.0/
1111
@@ -4950,10 +4950,32 @@ Suggested values include: 1] persuade; 2] express; 3] inform; 4] entertain</a:do
49504950
<element name="phr">
49514951
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(phrase) represents a grammatical phrase. [17.1. Linguistic Segment Categories]</a:documentation>
49524952
<ref name="macro.phraseSeq"/>
4953-
<ref name="att.global.attributes"/>
4953+
<ref name="att.global.attribute.n"/>
4954+
<ref name="att.global.attribute.xmllang"/>
4955+
<ref name="att.global.attribute.xmlbase"/>
4956+
<ref name="att.global.attribute.xmlspace"/>
4957+
<ref name="att.global.rendition.attribute.rend"/>
4958+
<ref name="att.global.rendition.attribute.style"/>
4959+
<ref name="att.global.rendition.attribute.rendition"/>
4960+
<ref name="att.global.linking.attribute.corresp"/>
4961+
<ref name="att.global.linking.attribute.synch"/>
4962+
<ref name="att.global.linking.attribute.sameAs"/>
4963+
<ref name="att.global.linking.attribute.copyOf"/>
4964+
<ref name="att.global.linking.attribute.next"/>
4965+
<ref name="att.global.linking.attribute.prev"/>
4966+
<ref name="att.global.linking.attribute.exclude"/>
4967+
<ref name="att.global.linking.attribute.select"/>
4968+
<ref name="att.global.analytic.attribute.ana"/>
4969+
<ref name="att.global.responsibility.attribute.cert"/>
4970+
<ref name="att.global.responsibility.attribute.resp"/>
4971+
<ref name="att.global.source.attribute.source"/>
49544972
<ref name="att.segLike.attributes"/>
49554973
<ref name="att.typed.attributes"/>
49564974
<ref name="att.notated.attributes"/>
4975+
<attribute name="xml:id">
4976+
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(identifier) provides a unique identifier for the element bearing the attribute.</a:documentation>
4977+
<data type="ID"/>
4978+
</attribute>
49574979
<empty/>
49584980
</element>
49594981
</define>
@@ -4987,11 +5009,44 @@ Suggested values include: 1] persuade; 2] express; 3] inform; 4] entertain</a:do
49875009
<s:assert test="@msd = $msd_values">MSD: '<s:value-of select="@msd"/>' is not in list of msd values (<s:value-of select="$msd_values"/>)</s:assert>
49885010
</s:rule>
49895011
</pattern>
4990-
<ref name="att.global.attributes"/>
5012+
<ref name="att.global.attribute.n"/>
5013+
<ref name="att.global.attribute.xmllang"/>
5014+
<ref name="att.global.attribute.xmlbase"/>
5015+
<ref name="att.global.attribute.xmlspace"/>
5016+
<ref name="att.global.rendition.attribute.style"/>
5017+
<ref name="att.global.rendition.attribute.rendition"/>
5018+
<ref name="att.global.linking.attribute.corresp"/>
5019+
<ref name="att.global.linking.attribute.synch"/>
5020+
<ref name="att.global.linking.attribute.sameAs"/>
5021+
<ref name="att.global.linking.attribute.copyOf"/>
5022+
<ref name="att.global.linking.attribute.next"/>
5023+
<ref name="att.global.linking.attribute.prev"/>
5024+
<ref name="att.global.linking.attribute.exclude"/>
5025+
<ref name="att.global.linking.attribute.select"/>
5026+
<ref name="att.global.analytic.attribute.ana"/>
5027+
<ref name="att.global.responsibility.attribute.cert"/>
5028+
<ref name="att.global.responsibility.attribute.resp"/>
5029+
<ref name="att.global.source.attribute.source"/>
49915030
<ref name="att.segLike.attributes"/>
49925031
<ref name="att.typed.attributes"/>
49935032
<ref name="att.linguistic.attributes"/>
49945033
<ref name="att.notated.attributes"/>
5034+
<attribute name="xml:id">
5035+
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(identifier) provides a unique identifier for the element bearing the attribute.</a:documentation>
5036+
<data type="ID"/>
5037+
</attribute>
5038+
<optional>
5039+
<attribute name="rend">
5040+
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(rendition) indicates how the element in question was rendered or presented in the source text.</a:documentation>
5041+
<list>
5042+
<oneOrMore>
5043+
<data type="token">
5044+
<param name="pattern">[^\p{C}\p{Z}]+</param>
5045+
</data>
5046+
</oneOrMore>
5047+
</list>
5048+
</attribute>
5049+
</optional>
49955050
<empty/>
49965051
</element>
49975052
</define>
@@ -5005,10 +5060,32 @@ Suggested values include: 1] persuade; 2] express; 3] inform; 4] entertain</a:do
50055060
<ref name="model.pPart.edit"/>
50065061
</choice>
50075062
</zeroOrMore>
5008-
<ref name="att.global.attributes"/>
5063+
<ref name="att.global.attribute.n"/>
5064+
<ref name="att.global.attribute.xmllang"/>
5065+
<ref name="att.global.attribute.xmlbase"/>
5066+
<ref name="att.global.attribute.xmlspace"/>
5067+
<ref name="att.global.rendition.attribute.rend"/>
5068+
<ref name="att.global.rendition.attribute.style"/>
5069+
<ref name="att.global.rendition.attribute.rendition"/>
5070+
<ref name="att.global.linking.attribute.corresp"/>
5071+
<ref name="att.global.linking.attribute.synch"/>
5072+
<ref name="att.global.linking.attribute.sameAs"/>
5073+
<ref name="att.global.linking.attribute.copyOf"/>
5074+
<ref name="att.global.linking.attribute.next"/>
5075+
<ref name="att.global.linking.attribute.prev"/>
5076+
<ref name="att.global.linking.attribute.exclude"/>
5077+
<ref name="att.global.linking.attribute.select"/>
5078+
<ref name="att.global.analytic.attribute.ana"/>
5079+
<ref name="att.global.responsibility.attribute.cert"/>
5080+
<ref name="att.global.responsibility.attribute.resp"/>
5081+
<ref name="att.global.source.attribute.source"/>
50095082
<ref name="att.segLike.attributes"/>
50105083
<ref name="att.typed.attributes"/>
50115084
<ref name="att.linguistic.attributes"/>
5085+
<attribute name="xml:id">
5086+
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(identifier) provides a unique identifier for the element bearing the attribute.</a:documentation>
5087+
<data type="ID"/>
5088+
</attribute>
50125089
<optional>
50135090
<attribute name="force">
50145091
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the extent to which this punctuation mark conventionally separates words or phrases</a:documentation>
@@ -5043,6 +5120,18 @@ Suggested values include: 1] persuade; 2] express; 3] inform; 4] entertain</a:do
50435120
<element name="span">
50445121
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">associates an interpretative annotation directly with a span of text. [17.3. Spans and Interpretations]</a:documentation>
50455122
<ref name="macro.phraseSeq.limited"/>
5123+
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
5124+
id="vicav_corpus-span-span-target-check-constraint-rule-32">
5125+
<s:rule xmlns="http://www.tei-c.org/ns/1.0"
5126+
xmlns:math="http://www.w3.org/1998/Math/MathML"
5127+
xmlns:rng="http://relaxng.org/ns/structure/1.0"
5128+
xmlns:s="http://purl.oclc.org/dsdl/schematron"
5129+
xmlns:svg="http://www.w3.org/2000/svg"
5130+
xmlns:xi="http://www.w3.org/2001/XInclude"
5131+
context="tei:span">
5132+
<s:assert test="parent::tei:spanGrp/preceding-sibling::tei:u/@xml:id = substring-after(@target, '#')">target of span should point at xml:id of preceding u element</s:assert>
5133+
</s:rule>
5134+
</pattern>
50465135
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
50475136
id="vicav_corpus-span-targetfrom-constraint-report-10">
50485137
<rule context="tei:span">
@@ -5095,7 +5184,14 @@ The attributes @to and @from on <name/> may each contain only a single value</re
50955184
</pattern>
50965185
<ref name="att.global.attributes"/>
50975186
<ref name="att.interpLike.attributes"/>
5098-
<ref name="att.pointing.attributes"/>
5187+
<ref name="att.pointing.attribute.targetLang"/>
5188+
<ref name="att.pointing.attribute.evaluate"/>
5189+
<attribute name="target">
5190+
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
5191+
<data type="anyURI">
5192+
<param name="pattern">\S+</param>
5193+
</data>
5194+
</attribute>
50995195
<optional>
51005196
<attribute name="from">
51015197
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">gives the identifier of the node which is the starting point of the span of text being annotated; if not accompanied by a <code xmlns="http://www.w3.org/1999/xhtml">@to</code> attribute, gives the identifier of the node of the entire span of text being annotated.</a:documentation>
@@ -5118,14 +5214,7 @@ The attributes @to and @from on <name/> may each contain only a single value</re
51185214
<define name="spanGrp">
51195215
<element name="spanGrp">
51205216
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(span group) collects together span tags. [17.3. Spans and Interpretations]</a:documentation>
5121-
<group>
5122-
<zeroOrMore>
5123-
<ref name="model.descLike"/>
5124-
</zeroOrMore>
5125-
<zeroOrMore>
5126-
<ref name="span"/>
5127-
</zeroOrMore>
5128-
</group>
5217+
<ref name="span"/>
51295218
<ref name="att.global.attributes"/>
51305219
<ref name="att.interpLike.attribute.subtype"/>
51315220
<ref name="att.interpLike.attribute.inst"/>
@@ -5461,7 +5550,7 @@ Suggested values include: 1] d (days); 2] h (hours); 3] min (minutes); 4] s (sec
54615550
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(utterance) contains a stretch of speech usually preceded and followed by silence or by a change of speaker. [8.3.1. Utterances]</a:documentation>
54625551
<ref name="macro.paraContent"/>
54635552
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
5464-
id="vicav_corpus-u-u-who-check-constraint-rule-32">
5553+
id="vicav_corpus-u-u-who-check-constraint-rule-33">
54655554
<s:rule xmlns="http://www.tei-c.org/ns/1.0"
54665555
xmlns:math="http://www.w3.org/1998/Math/MathML"
54675556
xmlns:rng="http://relaxng.org/ns/structure/1.0"

802_tei_odd/shawi_corpus.odd

+42-1
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@
254254
</elementSpec>
255255

256256
<elementSpec ident="spanGrp" module="analysis" mode="change">
257+
<content>
258+
<elementRef key="span" minOccurs="1" maxOccurs="1"/>
259+
</content>
257260
<attList>
258261
<attDef ident="type" mode="replace" usage="req">
259262
<valList type="closed">
@@ -264,6 +267,23 @@
264267
</attDef>
265268
</attList>
266269
</elementSpec>
270+
271+
<elementSpec ident="span" module="analysis" mode="change">
272+
<constraintSpec ident="span-target-check" scheme="schematron">
273+
<constraint>
274+
<s:rule context="tei:span">
275+
<s:assert test="parent::tei:spanGrp/preceding-sibling::tei:u/@xml:id = substring-after(@target, '#')">target of span should point at xml:id of preceding u element</s:assert>
276+
</s:rule>
277+
</constraint>
278+
</constraintSpec>
279+
<attList>
280+
<attDef ident="target" mode="replace" usage="req">
281+
<datatype>
282+
<dataRef key="teidata.pointer"/>
283+
</datatype>
284+
</attDef>
285+
</attList>
286+
</elementSpec>
267287

268288
<elementSpec ident="u" module="spoken" mode="change">
269289
<constraintSpec ident="u-who-check" scheme="schematron">
@@ -279,7 +299,13 @@
279299
<attDef ident="who" mode="change" usage="req"/>
280300
</attList>
281301
</elementSpec>
282-
302+
303+
<elementSpec ident="phr" module="analysis" mode="change">
304+
<attList>
305+
<attDef ident="xml:id" mode="change" usage="req"/>
306+
</attList>
307+
</elementSpec>
308+
283309
<elementSpec ident="w" module="analysis" mode="change">
284310
<constraintSpec ident="msd-spec" scheme="schematron">
285311
<constraint>
@@ -290,7 +316,22 @@
290316
</s:rule>
291317
</constraint>
292318
</constraintSpec>
319+
<attList>
320+
<attDef ident="xml:id" mode="change" usage="req"/>
321+
<attDef ident="rend" mode="change" usage="opt">
322+
<valList type="closed">
323+
<valItem ident="withDash"/>
324+
</valList>
325+
</attDef>
326+
</attList>
293327
</elementSpec>
328+
329+
<elementSpec ident="pc" module="analysis" mode="change">
330+
<attList>
331+
<attDef ident="xml:id" mode="change" usage="req"/>
332+
</attList>
333+
</elementSpec>
334+
294335
</schemaSpec>
295336
</body>
296337
</text>

0 commit comments

Comments
 (0)