|
82 | 82 | <head>Testing schematron constraints</head>
|
83 | 83 |
|
84 | 84 | <p xml:lang="la">
|
85 |
| - sicut erat in |
| 85 | + sicut erat in |
86 | 86 | <bibl><author>freddy</author></bibl> principia
|
87 | 87 | <list>
|
88 | 88 | <item>
|
|
91 | 91 | <num value="1/2"/> cats
|
92 | 92 | </item>
|
93 | 93 | </list>
|
94 |
| - </p> |
| 94 | + </p> |
95 | 95 |
|
96 |
| - <div> |
| 96 | + <div> |
97 | 97 | <p>Added by MDH. This tests the Schematron constraint that any
|
98 | 98 | element with <att>calendar</att> must have some textual
|
99 | 99 | content.</p>
|
100 | 100 | <p><date when="2012-09-06" calendar="http://en.wikipedia.org/wiki/Gregorian_calendar"/></p>
|
101 |
| - </div> |
| 101 | + </div> |
102 | 102 |
|
103 | 103 | <div>
|
104 | 104 | <head generatedBy="human">For CMC</head>
|
|
130 | 130 | </div>
|
131 | 131 | </div>
|
132 | 132 |
|
133 |
| - <div type="testingSpan"> |
| 133 | + <div type="testingSpan"> |
134 | 134 | <p><del>This has some content which is OK </del>
|
135 | 135 | <delSpan spanTo="#ds1"/>This one doesn't<anchor xml:id="ds1"/> but that's also OK.
|
136 | 136 | <delSpan/> That one (just to my left) is illegal
|
|
145 | 145 | <head>A Canon Text</head>
|
146 | 146 | <p>hello</p>
|
147 | 147 | </div>
|
148 |
| - </div> |
149 |
| - <div type="canon"> |
| 148 | + </div> |
| 149 | + <div type="canon"> |
150 | 150 | <head>Canon 2</head>
|
151 | 151 | <p>hello</p>
|
152 | 152 | <div type="canonText">
|
|
157 | 157 | <head>A 2nd Canon Text</head>
|
158 | 158 | <p>hello</p>
|
159 | 159 | </div>
|
160 |
| - </div> |
161 |
| - <div type="canon"> |
| 160 | + </div> |
| 161 | + <div type="canon"> |
162 | 162 | <head>Canon 3</head>
|
163 | 163 | <div type="canon">
|
164 | 164 | <head>Canon 4</head>
|
165 | 165 | </div>
|
166 |
| - </div> |
167 |
| - <div type="register"> |
| 166 | + </div> |
| 167 | + <div type="register"> |
168 | 168 | <head>Register 1</head>
|
169 | 169 | <div type="canon">
|
170 | 170 | <head>Canon 5</head>
|
171 | 171 | </div>
|
172 |
| - </div> |
173 |
| - <div type="redundant"> |
| 172 | + </div> |
| 173 | + <div type="redundant"> |
174 | 174 | <p>
|
175 | 175 | <s>This sentence contains
|
176 | 176 | <s>an illegally nested phrase</s>
|
177 | 177 | and should trigger a schematron squawk</s>
|
178 | 178 | </p>
|
179 |
| - </div> |
| 179 | + </div> |
180 | 180 | </div>
|
181 | 181 | <div type="test">
|
182 | 182 | <p>
|
183 |
| - Testing multiple occurences of a datatype in a single |
184 |
| - attribute value. The following should be valid: |
185 |
| - <distinct type="valid" o01="0" o02="0" o0i="0" o11="0" o12="1" o1i="1" o22="1 2" o2i="1 2">minimum</distinct> |
186 |
| - <distinct type="valid" o01="1" o02="1" o0i="1" o11="1" o12="1 2" o1i="1 2" o22="1 2" o2i="1 2 3">min +1 unless ≤, in which case max</distinct> |
187 |
| - <distinct type="valid" o01="1" o02="1 2" o0i="1 2 3 4 5 6 7 8 9 0" o11="1" o12="1 2" o1i="1 2 3 4 5 6 7 8 9 0" o22="1 2" o2i="1 2 3 4 5 6 7 8 9 0">max</distinct> |
188 |
| - </p> |
| 183 | + Testing multiple occurences of a datatype in a single |
| 184 | + attribute value. The following should be valid: |
| 185 | + <distinct type="valid" o01="0" o02="0" o0i="0" o11="0" o12="1" o1i="1" o22="1 2" o2i="1 2">minimum</distinct> |
| 186 | + <distinct type="valid" o01="1" o02="1" o0i="1" o11="1" o12="1 2" o1i="1 2" o22="1 2" o2i="1 2 3">min +1 unless ≤, in which case max</distinct> |
| 187 | + <distinct type="valid" o01="1" o02="1 2" o0i="1 2 3 4 5 6 7 8 9 0" o11="1" o12="1 2" o1i="1 2 3 4 5 6 7 8 9 0" o22="1 2" o2i="1 2 3 4 5 6 7 8 9 0">max</distinct> |
| 188 | + </p> |
189 | 189 | </div>
|
190 | 190 |
|
191 | 191 | <div>
|
|
234 | 234 | <div>
|
235 | 235 | <head>Some transcribed text with subst errors</head>
|
236 | 236 | <p>... are all included. <del hand="#RG">It is</del>
|
237 |
| - <subst><add>T</add></subst>the expressed</p> |
| 237 | + <subst><add>T</add></subst>the expressed</p> |
238 | 238 | <p> that he and his Sister Miſs D —
|
239 |
| - <lb/>who always lived with him, wd. be very |
240 |
| - <subst><lb/><add>principally</add></subst> remembered in her Will.</p> |
| 239 | + <lb/>who always lived with him, wd. be very |
| 240 | + <subst><lb/><add>principally</add></subst> remembered in her Will.</p> |
241 | 241 | <p><subst>ἐπιτρέψῃ [ἐπετρέψῃ]</subst> τῷ ὑποδέκτῃ μὴ ὀχλῆσαι</p>
|
242 | 242 | <p>τ<subst><add place="above">ῶν</add></subst>α συνκυρόντων<subst><del>α</del></subst>
|
243 |
| - ἐργαστηρί<hi rend="above">ων</hi><subst><del>α</del></subst></p> |
| 243 | + ἐργαστηρί<hi rend="above">ων</hi><subst><del>α</del></subst></p> |
244 | 244 | <p>While <del xml:id="r112">pondering</del> thus <add xml:id="r113">she mus'd</add>,
|
245 |
| - her pinions fann'd<substJoin target="#r112 #r113"/></p> |
| 245 | + her pinions fann'd<substJoin target="#r112 #r113"/></p> |
246 | 246 | </div>
|
247 | 247 |
|
248 | 248 | <div>
|
|
278 | 278 | </div>
|
279 | 279 |
|
280 | 280 | <div xml:id="msDesc_unitary_parts">
|
281 |
| - <head>test msDesc elements that should not be repeated</head> |
282 |
| - <p>Some manuscript description elements are supposed to occur |
283 |
| - a max of only once, even though RelaxNG allows infinite.</p> |
284 |
| - <p>Added 2023-10-11 19:21 by Syd.</p> |
285 |
| - <msDesc> |
286 |
| - <msIdentifier> |
287 |
| - <repository>MEL</repository> <!-- Middle Earth Library --> |
288 |
| - <collection>BB</collection> <!-- Bilbo Baggins --> |
289 |
| - <idno>mel:bb:ve:08</idno> <!-- I just made the "08" up --> |
290 |
| - <msName>riddle of Strider</msName> |
291 |
| - </msIdentifier> |
292 |
| - <msContents n="1"><ab>occurs only once, thus valid</ab></msContents> |
293 |
| - <physDesc n="1"><ab>occurs twice, thus invalid</ab></physDesc> |
294 |
| - <physDesc n="2"><ab>occurs twice, thus invalid</ab></physDesc> |
295 |
| - <history n="1"><ab>three occurrences, thus invalid</ab></history> |
296 |
| - <history n="2"><ab>three occurrences, thus invalid</ab></history> |
297 |
| - <history n="3"><ab>three occurrences, thus invalid</ab></history> |
298 |
| - <additional n="1"><surrogates>four occurrences, thus invalid</surrogates></additional> |
299 |
| - <additional n="2"><surrogates>four occurrences, thus invalid</surrogates></additional> |
300 |
| - <additional n="3"><surrogates>four occurrences, thus invalid</surrogates></additional> |
301 |
| - <additional n="4"><surrogates>four occurrences, thus invalid</surrogates></additional> |
302 |
| - </msDesc> |
303 |
| - <p>The above <gi>msDesc</gi> should generate 3 errors, one |
304 |
| - each for <gi>physDesc</gi>, <gi>history</gi>, and |
305 |
| - <gi>additional</gi>.</p> |
306 |
| - <lg> |
307 |
| - <lg> |
308 |
| - <l>All that is gold does not glitter,</l> |
309 |
| - <l>Not all those who wander are lost;</l> |
310 |
| - <l>The old that is strong does not wither,</l> |
311 |
| - <l>Deep roots are not reached by the frost.</l> |
312 |
| - </lg> |
313 |
| - <lg> |
314 |
| - <l>From the ashes a fire shall be woken,</l> |
315 |
| - <l>A light from the shadows shall spring;</l> |
316 |
| - <l>Renewed shall be blade that was broken,</l> |
317 |
| - <l>The crownless again shall be king.</l> |
318 |
| - </lg> |
319 |
| - </lg> |
| 281 | + <head>test msDesc elements that should not be repeated</head> |
| 282 | + <p>Some manuscript description elements are supposed to occur |
| 283 | + a max of only once, even though RelaxNG allows infinite.</p> |
| 284 | + <p>Added 2023-10-11 19:21 by Syd.</p> |
| 285 | + <msDesc> |
| 286 | + <msIdentifier> |
| 287 | + <repository>MEL</repository> <!-- Middle Earth Library --> |
| 288 | + <collection>BB</collection> <!-- Bilbo Baggins --> |
| 289 | + <idno>mel:bb:ve:08</idno> <!-- I just made the "08" up --> |
| 290 | + <msName>riddle of Strider</msName> |
| 291 | + </msIdentifier> |
| 292 | + <msContents n="1"><ab>occurs only once, thus valid</ab></msContents> |
| 293 | + <physDesc n="1"><ab>occurs twice, thus invalid</ab></physDesc> |
| 294 | + <physDesc n="2"><ab>occurs twice, thus invalid</ab></physDesc> |
| 295 | + <history n="1"><ab>three occurrences, thus invalid</ab></history> |
| 296 | + <history n="2"><ab>three occurrences, thus invalid</ab></history> |
| 297 | + <history n="3"><ab>three occurrences, thus invalid</ab></history> |
| 298 | + <additional n="1"><surrogates>four occurrences, thus invalid</surrogates></additional> |
| 299 | + <additional n="2"><surrogates>four occurrences, thus invalid</surrogates></additional> |
| 300 | + <additional n="3"><surrogates>four occurrences, thus invalid</surrogates></additional> |
| 301 | + <additional n="4"><surrogates>four occurrences, thus invalid</surrogates></additional> |
| 302 | + </msDesc> |
| 303 | + <p>The above <gi>msDesc</gi> should generate 3 errors, one |
| 304 | + each for <gi>physDesc</gi>, <gi>history</gi>, and |
| 305 | + <gi>additional</gi>.</p> |
| 306 | + <lg> |
| 307 | + <lg> |
| 308 | + <l>All that is gold does not glitter,</l> |
| 309 | + <l>Not all those who wander are lost;</l> |
| 310 | + <l>The old that is strong does not wither,</l> |
| 311 | + <l>Deep roots are not reached by the frost.</l> |
| 312 | + </lg> |
| 313 | + <lg> |
| 314 | + <l>From the ashes a fire shall be woken,</l> |
| 315 | + <l>A light from the shadows shall spring;</l> |
| 316 | + <l>Renewed shall be blade that was broken,</l> |
| 317 | + <l>The crownless again shall be king.</l> |
| 318 | + </lg> |
| 319 | + </lg> |
320 | 320 | </div>
|
321 | 321 | <div>
|
322 | 322 | <head>Shift should have a new attribute</head>
|
|
401 | 401 | <p>Here is <floatingText><body><div><p>a little floating text</p></div></body></floatingText>.</p>
|
402 | 402 | <ab>Here is <floatingText><body><div><p>another little floating text</p></div></body></floatingText>.</ab>
|
403 | 403 | <lg>
|
| 404 | + <epigraph> |
| 405 | + <quote> |
| 406 | + <p>This paragraph should be valid. |
| 407 | + The one around “find”, below, should be invalid.</p> |
| 408 | + </quote> |
| 409 | + </epigraph> |
404 | 410 | <l>I think that I shall never see <note><ab>Sight of TEI elements is significant in this little poem.</ab></note></l>
|
405 | 411 | <l>A <floatingText><body><ab>floating text</ab></body></floatingText> inside this <figure><ab>tree</ab></figure>.</l>
|
406 | 412 | <l>Nor can it be <floatingText><body><p>that I shall know</p></body></floatingText></l>
|
407 | 413 | <l><figure><p>A paragraph</p></figure> <note><p>herein below</p></note>.</l>
|
408 |
| - <l>More likely maybe I could find</l> |
| 414 | + <l>More likely maybe I could <quote><p>find</p></quote></l> |
409 | 415 | <l><floatingText><body><div><p>A div</p></div></body></floatingText> stuck in this poem's lines.</l>
|
410 | 416 | </lg>
|
411 | 417 | <p>And here is the same poem again, inside a giant floatingText and coded a little differently.</p>
|
| 418 | + <p>The “find”, below, <emph>should</emph> be flagged as an |
| 419 | + abstract model violation, IMHO, but is not because the |
| 420 | + Schematron is fooled by the fact that it is within a |
| 421 | + <gi>floatingText</gi>. Sigh. —Syd, 2024-05-18</p> |
412 | 422 | <floatingText>
|
413 | 423 | <body>
|
414 | 424 | <lg>
|
|
417 | 427 | <l>A <floatingText><body><ab>floating text</ab></body></floatingText> inside this <figure><ab>tree</ab></figure>.</l>
|
418 | 428 | <l>Nor can it be that I shall know</l>
|
419 | 429 | <l><figure><p>A paragraph</p></figure> <note><p>herein below</p></note>.</l>
|
420 |
| - <l>More likely maybe I could find</l> |
| 430 | + <l>More likely maybe I could <quote><p>find</p></quote></l> |
421 | 431 | <l><floatingText><body><div><p>A div</p></div></body></floatingText> stuck in this poem's lines.</l>
|
422 | 432 | </lg>
|
423 | 433 | </body>
|
|
432 | 442 | <name type="file">detest.odd</name> because they would break
|
433 | 443 | the build there</desc>
|
434 | 444 | <elementSpec ident="silly_and_not_used" mode="add">
|
435 |
| - <desc>See <code>//elementSpec[@ident eq 'abbr']/listRef</code> in <name type="file">detest.odd</name></desc> |
| 445 | + <desc>See <code>//elementSpec[@ident eq 'abbr']/listRef</code> in <name type="file">detest.odd</name></desc> |
436 | 446 | <listRef>
|
437 | 447 | <ref type="invalid" n="1">no target (2B caught by Schematron)</ref>
|
438 | 448 | <ref type="valid" n="2" target="https://www.example.edu/tst">good target absolute URI</ref>
|
|
0 commit comments