1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<?xml-model href =" http://jenkins.tei-c.org/job/TEIP5/lastSuccessfulBuild/artifact/P5/release/xml/tei/odd/p5.nvdl" type =" application/xml" schematypens =" http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0" ?>
3
- <TEI xmlns =" http://www.tei-c.org/ns/1.0" xmlns : xi =" http://www.w3.org/2001/XInclude" >
3
+ <TEI xmlns =" http://www.tei-c.org/ns/1.0" xmlns : xi =" http://www.w3.org/2001/XInclude" xmlns : sch = " http://purl.oclc.org/dsdl/schematron " >
4
4
<teiHeader >
5
5
<fileDesc >
6
6
<titleStmt >
@@ -3483,13 +3483,18 @@ live without God in the world, and only mind earthly things.
3483
3483
<attDef ident =" target" mode =" change" >
3484
3484
<constraintSpec ident =" validtarget" scheme =" schematron" >
3485
3485
<constraint >
3486
- <rule xmlns =" http://purl.oclc.org/dsdl/schematron" context =" tei:*[@target]" >
3487
- <let name =" results"
3488
- value =" for $t in tokenize(normalize-space(@target),'\s+') return starts-with($t,'#') and not(id(substring($t,2)))" />
3489
- <report test =" some $x in $results satisfies $x" > Error: Every local pointer
3490
- in "<value-of select =" @target" />" must point to an ID in this document
3491
- (<value-of select =" $results" />)</report >
3492
- </rule >
3486
+ <sch : rule context =" tei:*[@target]" >
3487
+ <!-- If & when we are confident the processor
3488
+ will be an XPath 3+ processor the
3489
+ “tokenize(normalize-space(@target),'\s+')”
3490
+ below could be shortened to just
3491
+ “tokenize(@target)”. —Syd, 2024-04-12 -->
3492
+ <sch : let name =" results"
3493
+ value =" for $t in tokenize(normalize-space(@target),'\s+') return starts-with($t,'#') and not(id(substring($t,2)))" />
3494
+ <sch : report test =" some $x in $results satisfies $x" > Error: Every local pointer
3495
+ in "<sch : value-of select =" @target" />" must point to an ID in this document
3496
+ (<sch : value-of select =" $results" />)</sch : report >
3497
+ </sch : rule >
3493
3498
</constraint >
3494
3499
</constraintSpec >
3495
3500
</attDef >
@@ -3498,24 +3503,28 @@ live without God in the world, and only mind earthly things.
3498
3503
<classSpec type =" atts" ident =" att.global.rendition" mode =" change" >
3499
3504
<constraintSpec ident =" renditionpointer" scheme =" schematron" >
3500
3505
<constraint >
3501
- <rule xmlns =" http://purl.oclc.org/dsdl/schematron" context =" tei:*[@rendition]" >
3502
- <let name =" results"
3503
- value =" for $val in tokenize(normalize-space(@rendition),'\s+') return starts-with($val,'simple:') or (starts-with($val,'#') and //tei:rendition[@xml:id=substring($val,2)])" />
3504
- <assert test =" every $x in $results satisfies $x" > Error: Each of the rendition
3505
- values in "<value-of select =" @rendition" />" must point to a local ID or to a
3506
- token in the Simple scheme (<value-of select =" $results" />)</assert >
3507
- </rule >
3506
+ <sch : rule context =" tei:*[@rendition]" >
3507
+ <sch : let name =" results"
3508
+ value =" for $val in tokenize(normalize-space(@rendition),'\s+') return starts-with($val,'simple:')
3509
+ or
3510
+ (starts-with($val,'#')
3511
+ and
3512
+ //tei:rendition[@xml:id=substring($val,2)])" />
3513
+ <sch : assert test =" every $x in $results satisfies $x" > Error: Each of the rendition
3514
+ values in "<sch : value-of select =" @rendition" />" must point to a local ID or to a
3515
+ token in the Simple scheme (<sch : value-of select =" $results" />)</sch : assert >
3516
+ </sch : rule >
3508
3517
</constraint >
3509
3518
</constraintSpec >
3510
3519
<constraintSpec ident =" corresppointer" scheme =" schematron" >
3511
3520
<constraint >
3512
- <rule xmlns = " http://purl.oclc.org/dsdl/schematron " context =" tei:*[@corresp]" >
3513
- <let name =" results"
3521
+ <sch : rule context =" tei:*[@corresp]" >
3522
+ <sch : let name =" results"
3514
3523
value =" for $t in tokenize(normalize-space(@corresp),'\s+') return starts-with($t,'#') and not(id(substring($t,2)))" />
3515
- <report test =" some $x in $results satisfies $x" > Error: Every local pointer in
3516
- "<value-of select =" @corresp" />" must point to an ID in this document
3517
- (<value-of select =" $results" />)</report >
3518
- </rule >
3524
+ <sch : report test =" some $x in $results satisfies $x" > Error: Every local pointer in
3525
+ "<sch : value-of select =" @corresp" />" must point to an ID in this document
3526
+ (<sch : value-of select =" $results" />)</sch : report >
3527
+ </sch : rule >
3519
3528
</constraint >
3520
3529
</constraintSpec >
3521
3530
<!-- remove unused attributes @rend and @style; constrain values for @rendition -->
@@ -3993,9 +4002,11 @@ live without God in the world, and only mind earthly things.
3993
4002
<elementSpec ident =" bibl" mode =" change" >
3994
4003
<constraintSpec mode =" add" ident =" noEmptyBibl" scheme =" schematron" >
3995
4004
<constraint >
3996
- <assert xmlns =" http://purl.oclc.org/dsdl/schematron"
3997
- test =" child::* or child::text()[normalize-space()]" role =" ERROR" > Element
3998
- "<name />" may not be empty. </assert >
4005
+ <sch : rule context =" tei:bibl" >
4006
+ <sch : assert test =" child::* or child::text()[normalize-space()]" role =" ERROR" >
4007
+ Element "<sch : name />" may not be empty.
4008
+ </sch : assert >
4009
+ </sch : rule >
3999
4010
</constraint >
4000
4011
</constraintSpec >
4001
4012
<model predicate =" parent::listBibl" behaviour =" listItem" />
@@ -4109,16 +4120,24 @@ live without God in the world, and only mind earthly things.
4109
4120
<elementSpec ident =" choice" mode =" change" >
4110
4121
<constraintSpec ident =" choiceSize" scheme =" schematron" mode =" add" >
4111
4122
<constraint >
4112
- <assert xmlns =" http://purl.oclc.org/dsdl/schematron" test =" count(*) > 1"
4113
- role =" ERROR" > Element "<name />" must have at least two child elements.</assert >
4123
+ <sch : rule context =" tei:choice" >
4124
+ <sch : assert test =" count(*) gt 1" role =" ERROR" >
4125
+ Element "<sch : name />" must have at least two child elements.
4126
+ </sch : assert >
4127
+ </sch : rule >
4114
4128
</constraint >
4115
4129
</constraintSpec >
4116
4130
<constraintSpec ident =" choiceContent" scheme =" schematron" mode =" add" >
4117
4131
<constraint >
4118
- <assert xmlns =" http://purl.oclc.org/dsdl/schematron"
4119
- test =" (tei:corr or tei:sic or tei:expan or tei:abbr or tei:reg or tei:orig) and ((tei:corr and tei:sic) or (tei:expan and tei:abbr) or (tei:reg and tei:orig))"
4120
- role =" ERROR" > Element "<name />" must have corresponding corr/sic, expand/abbr,
4121
- reg/orig </assert >
4132
+ <sch : rule context =" tei:choice" >
4133
+ <sch : assert test =" ( tei:corr and tei:sic )
4134
+ or
4135
+ ( tei:expan and tei:abbr )
4136
+ or
4137
+ ( tei:reg and tei:orig )" role =" ERROR" >
4138
+ Element "<sch : name />" must have corresponding corr/sic, expand/abbr, reg/orig
4139
+ </sch : assert >
4140
+ </sch : rule >
4122
4141
</constraint >
4123
4142
</constraintSpec >
4124
4143
<model output =" plain" predicate =" sic and corr" behaviour =" inline" >
@@ -5082,22 +5101,18 @@ live without God in the world, and only mind earthly things.
5082
5101
5083
5102
</elementSpec >
5084
5103
<elementSpec ident =" text" mode =" change" >
5085
- <constraintSpec xmlns =" http://www.tei-c.org/ns/1.0"
5086
- xmlns : XSL =" http://www.w3.org/1999/XSL/Transform" ident =" headeronlyelement"
5087
- scheme =" schematron" >
5104
+ <constraintSpec ident =" headeronlyelement" scheme =" schematron" >
5088
5105
<constraint >
5089
- <!-- <rule xmlns="http://purl.oclc.org/dsdl/schematron"
5106
+ <!-- <sch:rule
5090
5107
context="tei:att | tei:biblFull | tei:biblStruct | tei:change | tei:charDecl | tei:charProp | tei:editor
5091
5108
| tei:editorialDecl | tei:email | tei:encodingDesc | tei:extent | tei:fileDesc | tei:gi | tei:glyph | tei:glyphName |
5092
5109
tei:idno | tei:imprint | tei:keywords | tei:licence | tei:listChange | tei:listPerson | tei:localName | tei:monogr |
5093
5110
tei:msDesc | tei:msIdentifier | tei:person | tei:physDesc | tei:profileDesc | tei:publicationStmt | tei:relatedItem |
5094
5111
tei:repository | tei:resp | tei:respStmt | tei:sourceDesc | tei:tag | tei:teiHeader | tei:term | tei:textClass | tei:textDesc
5095
5112
| tei:titleStmt | tei:typeDesc | tei:val | tei:value">-->
5096
- <rule xmlns =" http://purl.oclc.org/dsdl/schematron"
5097
- context =" tei:term | tei:biblFull " >
5098
- <report test =" ancestor::tei:text" >Error: The element <name /> is not permitted
5099
- outside the header</report >
5100
- </rule >
5113
+ <sch : rule context =" tei:term | tei:biblFull" >
5114
+ <sch : report test =" ancestor::tei:text" >Error: The element <sch : name /> is not permitted outside the header</sch : report >
5115
+ </sch : rule >
5101
5116
</constraint >
5102
5117
</constraintSpec >
5103
5118
<model behaviour =" body" >
0 commit comments