Skip to content

Commit b2eabd5

Browse files
committed
A proposed fix for
#773. I am quite confident it fixes the problem identified in that issue, but does it break anything else?
1 parent 00ad120 commit b2eabd5

File tree

5 files changed

+32
-33
lines changed

5 files changed

+32
-33
lines changed

Test2/expected-results/testPure1.rng

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5802,20 +5802,17 @@ Elements]</a:documentation>
58025802
</optional>
58035803
</optional>
58045804
</group>
5805-
<group>
5806-
<optional>
5807-
<ref name="t_publisher"/>
5808-
</optional>
5809-
<optional>
5810-
<ref name="t_publisher"/>
5805+
<rng:optional xmlns:rng="http://relaxng.org/ns/structure/1.0">
5806+
<rng:group>
5807+
<rng:ref name="t_publisher"/>
58115808
<optional>
5812-
<ref name="t_publisher"/>
5809+
<rng:ref name="t_publisher"/>
58135810
<optional>
5814-
<ref name="t_publisher"/>
5811+
<rng:ref name="t_publisher"/>
58155812
</optional>
58165813
</optional>
5817-
</optional>
5818-
</group>
5814+
</rng:group>
5815+
</rng:optional>
58195816
<optional>
58205817
<ref name="t_date"/>
58215818
</optional>

Test2/expected-results/testPure1InvalidInstanceRngMessages.txt

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@
77
/invalidInstances/testPure1InvalidInstance.xml:78:47: error: value of attribute "copyOf" is invalid; must be an integer matching the regular expression "[0-9][0-9]?"
88
/invalidInstances/testPure1InvalidInstance.xml:90:20: error: element "title" not allowed yet; missing required element "author"
99
/invalidInstances/testPure1InvalidInstance.xml:97:24: error: element "publisher" not allowed yet; missing required element "title"
10-
/invalidInstances/testPure1InvalidInstance.xml:110:31: error: element "publisher" not allowed here; expected the element end-tag or element "date"
11-
/invalidInstances/testPure1InvalidInstance.xml:113:23: error: element "biblStruct" not allowed anywhere; expected the element end-tag or element "anchor", "bibl", "biblFull", "cb", "gb", "lb", "listBibl", "milestone" or "pb"
12-
/invalidInstances/testPure1InvalidInstance.xml:115:60: error: element "biblStruct" not allowed anywhere; expected the element end-tag or element "anchor", "bibl", "biblFull", "cb", "gb", "lb", "listBibl", "milestone" or "pb"
13-
/invalidInstances/testPure1InvalidInstance.xml:117:34: error: element "biblStruct" not allowed anywhere; expected the element end-tag or element "anchor", "bibl", "biblFull", "cb", "gb", "lb", "listBibl", "milestone" or "pb"
14-
/invalidInstances/testPure1InvalidInstance.xml:127:12: error: element "w" missing required attribute "ana"
15-
/invalidInstances/testPure1InvalidInstance.xml:137:53: error: element "addName" not allowed anywhere; expected the element end-tag, text or element "abbr", "add", "address", "alt", "altGrp", "anchor", "att", "binaryObject", "c", "cb", "choice", "cit", "cl", "corr", "date", "del", "distinct", "ellipsis", "email", "emph", "expan", "floatingText", "foreign", "gap", "gb", "gi", "gloss", "graphic", "hi", "idno", "index", "interp", "interpGrp", "lb", "link", "linkGrp", "m", "measure", "measureGrp", "media", "mentioned", "milestone", "name", "note", "noteGrp", "num", "orgName", "orig", "pb", "pc", "persName", "phr", "placeName", "ptr", "q", "quote", "ref", "reg", "rs", "ruby", "s", "said", "seg", "sic", "soCalled", "span", "spanGrp", "term", "time", "timeline", "title", "unclear", "unit", "val" or "w"
16-
/invalidInstances/testPure1InvalidInstance.xml:141:13: error: element "div1" not allowed anywhere; expected the element end-tag or element "alt", "altGrp", "anchor", "argument", "byline", "cb", "closer", "dateline", "div", "divGen", "docAuthor", "docDate", "ellipsis", "epigraph", "gap", "gb", "index", "interp", "interpGrp", "lb", "link", "linkGrp", "meeting", "milestone", "note", "noteGrp", "pb", "postscript", "salute", "signed", "span", "spanGrp", "timeline" or "trailer"
17-
/invalidInstances/testPure1InvalidInstance.xml:142:46: error: element "div1" not allowed anywhere; expected the element end-tag or element "alt", "altGrp", "anchor", "argument", "byline", "cb", "closer", "dateline", "div", "divGen", "docAuthor", "docDate", "ellipsis", "epigraph", "gap", "gb", "index", "interp", "interpGrp", "lb", "link", "linkGrp", "meeting", "milestone", "note", "noteGrp", "pb", "postscript", "salute", "signed", "span", "spanGrp", "timeline" or "trailer"
18-
/invalidInstances/testPure1InvalidInstance.xml:143:45: error: element "div1" not allowed anywhere; expected the element end-tag or element "alt", "altGrp", "anchor", "argument", "byline", "cb", "closer", "dateline", "div", "divGen", "docAuthor", "docDate", "ellipsis", "epigraph", "gap", "gb", "index", "interp", "interpGrp", "lb", "link", "linkGrp", "meeting", "milestone", "note", "noteGrp", "pb", "postscript", "salute", "signed", "span", "spanGrp", "timeline" or "trailer"
19-
/invalidInstances/testPure1InvalidInstance.xml:148:73: error: character content of element "email" invalid; must be equal to "[email protected]" or "[email protected]"
20-
/invalidInstances/testPure1InvalidInstance.xml:154:30: error: element "reg" not allowed yet; expected element "abbr", "corr", "expan" or "orig"
21-
/invalidInstances/testPure1InvalidInstance.xml:154:46: error: element "orig" not allowed here; expected the element end-tag
22-
/invalidInstances/testPure1InvalidInstance.xml:161:19: error: element "alt_of_seq_3-4" incomplete; expected element "emph" or "orgName"
23-
/invalidInstances/testPure1InvalidInstance.xml:163:24: error: element "orgName" not allowed here; expected the element end-tag
24-
/invalidInstances/testPure1InvalidInstance.xml:168:19: error: element "alt_of_seq_3-4" incomplete; missing required element "emph"
10+
/invalidInstances/testPure1InvalidInstance.xml:107:31: error: element "publisher" not allowed here; expected the element end-tag or element "date"
11+
/invalidInstances/testPure1InvalidInstance.xml:109:31: error: element "publisher" not allowed here; expected the element end-tag or element "date"
12+
/invalidInstances/testPure1InvalidInstance.xml:112:23: error: element "biblStruct" not allowed anywhere; expected the element end-tag or element "anchor", "bibl", "biblFull", "cb", "gb", "lb", "listBibl", "milestone" or "pb"
13+
/invalidInstances/testPure1InvalidInstance.xml:114:60: error: element "biblStruct" not allowed anywhere; expected the element end-tag or element "anchor", "bibl", "biblFull", "cb", "gb", "lb", "listBibl", "milestone" or "pb"
14+
/invalidInstances/testPure1InvalidInstance.xml:116:34: error: element "biblStruct" not allowed anywhere; expected the element end-tag or element "anchor", "bibl", "biblFull", "cb", "gb", "lb", "listBibl", "milestone" or "pb"
15+
/invalidInstances/testPure1InvalidInstance.xml:126:12: error: element "w" missing required attribute "ana"
16+
/invalidInstances/testPure1InvalidInstance.xml:136:53: error: element "addName" not allowed anywhere; expected the element end-tag, text or element "abbr", "add", "address", "alt", "altGrp", "anchor", "att", "binaryObject", "c", "cb", "choice", "cit", "cl", "corr", "date", "del", "distinct", "ellipsis", "email", "emph", "expan", "floatingText", "foreign", "gap", "gb", "gi", "gloss", "graphic", "hi", "idno", "index", "interp", "interpGrp", "lb", "link", "linkGrp", "m", "measure", "measureGrp", "media", "mentioned", "milestone", "name", "note", "noteGrp", "num", "orgName", "orig", "pb", "pc", "persName", "phr", "placeName", "ptr", "q", "quote", "ref", "reg", "rs", "ruby", "s", "said", "seg", "sic", "soCalled", "span", "spanGrp", "term", "time", "timeline", "title", "unclear", "unit", "val" or "w"
17+
/invalidInstances/testPure1InvalidInstance.xml:140:13: error: element "div1" not allowed anywhere; expected the element end-tag or element "alt", "altGrp", "anchor", "argument", "byline", "cb", "closer", "dateline", "div", "divGen", "docAuthor", "docDate", "ellipsis", "epigraph", "gap", "gb", "index", "interp", "interpGrp", "lb", "link", "linkGrp", "meeting", "milestone", "note", "noteGrp", "pb", "postscript", "salute", "signed", "span", "spanGrp", "timeline" or "trailer"
18+
/invalidInstances/testPure1InvalidInstance.xml:141:46: error: element "div1" not allowed anywhere; expected the element end-tag or element "alt", "altGrp", "anchor", "argument", "byline", "cb", "closer", "dateline", "div", "divGen", "docAuthor", "docDate", "ellipsis", "epigraph", "gap", "gb", "index", "interp", "interpGrp", "lb", "link", "linkGrp", "meeting", "milestone", "note", "noteGrp", "pb", "postscript", "salute", "signed", "span", "spanGrp", "timeline" or "trailer"
19+
/invalidInstances/testPure1InvalidInstance.xml:142:45: error: element "div1" not allowed anywhere; expected the element end-tag or element "alt", "altGrp", "anchor", "argument", "byline", "cb", "closer", "dateline", "div", "divGen", "docAuthor", "docDate", "ellipsis", "epigraph", "gap", "gb", "index", "interp", "interpGrp", "lb", "link", "linkGrp", "meeting", "milestone", "note", "noteGrp", "pb", "postscript", "salute", "signed", "span", "spanGrp", "timeline" or "trailer"
20+
/invalidInstances/testPure1InvalidInstance.xml:147:73: error: character content of element "email" invalid; must be equal to "[email protected]" or "[email protected]"
21+
/invalidInstances/testPure1InvalidInstance.xml:153:30: error: element "reg" not allowed yet; expected element "abbr", "corr", "expan" or "orig"
22+
/invalidInstances/testPure1InvalidInstance.xml:153:46: error: element "orig" not allowed here; expected the element end-tag
23+
/invalidInstances/testPure1InvalidInstance.xml:160:19: error: element "alt_of_seq_3-4" incomplete; expected element "emph" or "orgName"
24+
/invalidInstances/testPure1InvalidInstance.xml:162:24: error: element "orgName" not allowed here; expected the element end-tag
25+
/invalidInstances/testPure1InvalidInstance.xml:167:19: error: element "alt_of_seq_3-4" incomplete; missing required element "emph"
26+
/invalidInstances/testPure1InvalidInstance.xml:173:11: error: element "emph" not allowed here; expected the element end-tag
27+
/invalidInstances/testPure1InvalidInstance.xml:173:16: error: element "lb" not allowed here; expected the element end-tag
2528
/invalidInstances/testPure1InvalidInstance.xml:174:11: error: element "emph" not allowed here; expected the element end-tag
2629
/invalidInstances/testPure1InvalidInstance.xml:174:16: error: element "lb" not allowed here; expected the element end-tag
27-
/invalidInstances/testPure1InvalidInstance.xml:175:11: error: element "emph" not allowed here; expected the element end-tag
28-
/invalidInstances/testPure1InvalidInstance.xml:175:16: error: element "lb" not allowed here; expected the element end-tag

Test2/inputFiles/invalidInstances/testPure1InvalidInstance.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@
106106
<publisher n="3"/>
107107
<publisher n="4"/>
108108
<!-- That should be enough to make it fail, as 3 is the max -->
109-
<!-- But it doesn't work right. See #354. -->
110109
<publisher n="5"/>
111110
<date when="2019-01-06"/>
112111
</bibl>

debian-tei-xsl/debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
tei-xsl (7.60.0a) natty; urgency=low
2+
3+
* new release from upstream
4+
5+
-- TEI <[email protected]> Thu, 04 Sep 2025 22:20:25 -0400
6+
17
tei-xsl (7.59.0) natty; urgency=low
28

39
* new release from upstream

odds/teiodds.xsl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,11 +2243,7 @@ of this software, even if advised of the possibility of such damage.
22432243
<xsl:variable name="count" select="$max - $min"/>
22442244
<rng:group>
22452245
<xsl:choose>
2246-
<xsl:when test="$min eq 0">
2247-
<rng:optional>
2248-
<xsl:copy-of select="$c"/>
2249-
</rng:optional>
2250-
</xsl:when>
2246+
<xsl:when test="$min eq 0"/>
22512247
<xsl:otherwise>
22522248
<xsl:for-each select="1 to min( ( $min, $maxint ) )">
22532249
<xsl:copy-of select="$c"/>

0 commit comments

Comments
 (0)