Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make att.repeatable work for <sequence>, <alternate>, and <anyElement> #633

Merged
merged 12 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Test/expected-results/test-pure.odd.html
Original file line number Diff line number Diff line change
Expand Up @@ -1080,9 +1080,9 @@ <h2>
</td>
<td class="wovenodd-col2">
<pre id="index.xml-eg-d32e835" class="pre_eg">
element t5 { text | (
element t5 { text | ( (
<a class="link_ref" href="#TEI.bit" title="&lt;bit&gt;">bit</a>,
<a class="link_ref" href="#TEI.bob" title="&lt;bob&gt;">bob</a> )+ }
<a class="link_ref" href="#TEI.bob" title="&lt;bob&gt;">bob</a> )+ ) }
<a href="#index.xml-eg-d32e835" class="anchorlink">⚓</a>
</pre>
</td>
Expand Down
1,522 changes: 697 additions & 825 deletions Test/expected-results/test.rng

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions Test/expected-results/test15.odd.html
Original file line number Diff line number Diff line change
Expand Up @@ -853,24 +853,26 @@ <h2>
<a class="link_ref" itemprop="ref" href="#TEI.model.global" title="model.global agrupa elementos vacíos que pueden aparecer en cualquier punto de un texto TEI [1.3. The TEI Class System]">model.global</a> )*,
(
(
( (
(
( ( (
<a class="link_ref" itemprop="ref" href="#TEI.model.divLike" title="model.divLike agrupa los elementos usados para representar divisiones estructurales recursivamente.">model.divLike</a> |
<a class="link_ref" itemprop="ref" href="#TEI.model.divGenLike" title="model.divGenLike agrupa elementos usados para representar divisiones estructurales que se generan explícitamente porque estan p...">model.divGenLike</a> ),
<a class="link_ref" itemprop="ref" href="#TEI.model.global" title="model.global agrupa elementos vacíos que pueden aparecer en cualquier punto de un texto TEI [1.3. The TEI Class System]">model.global</a>* )+
| (
( ( schemaSpec |
<a class="link_ref" itemprop="ref" href="#TEI.model.global" title="model.global agrupa elementos vacíos que pueden aparecer en cualquier punto de un texto TEI [1.3. The TEI Class System]">model.global</a>* )+ )
| (
( ( ( schemaSpec |
<a class="link_ref" itemprop="ref" href="#TEI.model.common" title="model.common agrupa elementos comunes a nivel de fragmentos de texto o internivel. [1.3. The TEI Class System]">model.common</a> ),
<a class="link_ref" itemprop="ref" href="#TEI.model.global" title="model.global agrupa elementos vacíos que pueden aparecer en cualquier punto de un texto TEI [1.3. The TEI Class System]">model.global</a>* )+,
( (
<a class="link_ref" itemprop="ref" href="#TEI.model.global" title="model.global agrupa elementos vacíos que pueden aparecer en cualquier punto de un texto TEI [1.3. The TEI Class System]">model.global</a>* )+ ),
( ( (
<a class="link_ref" itemprop="ref" href="#TEI.model.divLike" title="model.divLike agrupa los elementos usados para representar divisiones estructurales recursivamente.">model.divLike</a> |
<a class="link_ref" itemprop="ref" href="#TEI.model.divGenLike" title="model.divGenLike agrupa elementos usados para representar divisiones estructurales que se generan explícitamente porque estan p...">model.divGenLike</a> ),
<a class="link_ref" itemprop="ref" href="#TEI.model.global" title="model.global agrupa elementos vacíos que pueden aparecer en cualquier punto de un texto TEI [1.3. The TEI Class System]">model.global</a>* )*
)
),
(
<a class="link_ref" itemprop="ref" href="#TEI.model.global" title="model.global agrupa elementos vacíos que pueden aparecer en cualquier punto de un texto TEI [1.3. The TEI Class System]">model.global</a>* )* )
)
),
( (
<a class="link_ref" itemprop="ref" href="#TEI.model.divBottom" title="model.divBottom agrupa elementos que pueden aparecer sólo al final de una división textual p.ej. un tráiler. [4.2. Elements Com...">model.divBottom</a>,
<a class="link_ref" itemprop="ref" href="#TEI.model.global" title="model.global agrupa elementos vacíos que pueden aparecer en cualquier punto de un texto TEI [1.3. The TEI Class System]">model.global</a>* )*
)?
<a class="link_ref" itemprop="ref" href="#TEI.model.global" title="model.global agrupa elementos vacíos que pueden aparecer en cualquier punto de un texto TEI [1.3. The TEI Class System]">model.global</a>* )* )
)?
)
)
}
<a href="#index.xml-eg-d33e1324" class="anchorlink">⚓</a>
Expand Down
22 changes: 13 additions & 9 deletions Test/expected-results/test15.odd.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,11 @@ choice =

## (choice) groups a number of alternative encodings for the same point in a text. [3.5. Simple Editorial Changes]
element choice {
(model.choicePart | choice)+, att.global.attributes, empty
(model.choicePart | choice),
(model.choicePart | choice),
(model.choicePart | choice)*,
att.global.attributes,
empty
}
reg =

Expand Down Expand Up @@ -5439,7 +5443,7 @@ floatingText =
element div {
((model.divTop | model.global)*,
((((model.divLike | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.divLike | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?)
>> sch:pattern [
Expand Down Expand Up @@ -5504,7 +5508,7 @@ div1 =
element div1 {
((model.divTop | model.global)*,
((((model.div2Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div2Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -5519,7 +5523,7 @@ div2 =
element div2 {
((model.divTop | model.global)*,
((((model.div3Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div3Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -5534,7 +5538,7 @@ div3 =
element div3 {
((model.divTop | model.global)*,
((((model.div4Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div4Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -5549,7 +5553,7 @@ div4 =
element div4 {
((model.divTop | model.global)*,
((((model.div5Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div5Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -5564,7 +5568,7 @@ div5 =
element div5 {
((model.divTop | model.global)*,
((((model.div6Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div6Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -5579,7 +5583,7 @@ div6 =
element div6 {
((model.divTop | model.global)*,
((((model.div7Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div7Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -5593,7 +5597,7 @@ div7 =
## (level-7 text division) contains the smallest possible subdivision of the front, body or back of a text, larger than a paragraph. [4.1.2. Numbered Divisions]
element div7 {
((model.divTop | model.global)*,
(((model.common), model.global*)+,
((model.common, model.global*)+,
(model.divBottom, model.global*)*)?),
att.global.attributes,
att.divLike.attributes,
Expand Down
22 changes: 13 additions & 9 deletions Test/expected-results/test21.odd.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -2923,7 +2923,11 @@ choice =

## (choix) regroupe un certain nombre de balisages alternatifs possibles pour un même endroit dans un texte. [3.5. Simple Editorial Changes]
element choice {
(model.choicePart | choice)+, att.global.attributes, empty
(model.choicePart | choice),
(model.choicePart | choice),
(model.choicePart | choice)*,
att.global.attributes,
empty
}
reg =

Expand Down Expand Up @@ -10879,7 +10883,7 @@ group =
element div {
((model.divTop | model.global)*,
((((model.divLike | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.divLike | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?)
>> sch:pattern [
Expand Down Expand Up @@ -10942,7 +10946,7 @@ div1 =
element div1 {
((model.divTop | model.global)*,
((((model.div2Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div2Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -10957,7 +10961,7 @@ div2 =
element div2 {
((model.divTop | model.global)*,
((((model.div3Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div3Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -10972,7 +10976,7 @@ div3 =
element div3 {
((model.divTop | model.global)*,
((((model.div4Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div4Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -10987,7 +10991,7 @@ div4 =
element div4 {
((model.divTop | model.global)*,
((((model.div5Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div5Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -11002,7 +11006,7 @@ div5 =
element div5 {
((model.divTop | model.global)*,
((((model.div6Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div6Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -11017,7 +11021,7 @@ div6 =
element div6 {
((model.divTop | model.global)*,
((((model.div7Like | model.divGenLike), model.global*)+
| (((model.common), model.global*)+,
| ((model.common, model.global*)+,
((model.div7Like | model.divGenLike), model.global*)*)),
(model.divBottom, model.global*)*)?),
att.global.attributes,
Expand All @@ -11031,7 +11035,7 @@ div7 =
## ( division du texte de niveau 7) contient la plus petite subdivision possible dans le texte préliminaire, dans le corps d’un texte ou dans le texte postliminaire, plus grande néanmoins qu’un paragraphe. [4.1.2. Numbered Divisions]
element div7 {
((model.divTop | model.global)*,
(((model.common), model.global*)+,
((model.common, model.global*)+,
(model.divBottom, model.global*)*)?),
att.global.attributes,
att.divLike.attributes,
Expand Down
10 changes: 5 additions & 5 deletions Test/expected-results/test3.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ <h1>
<address>Sebastian Rahtz. Date: 1970-01-01
<br />
<!--
Generated from index.xml using XSLT stylesheets version 0
based on http://www.tei-c.org/Stylesheets/
on 1970-01-01.
SAXON.
--></address>
Generated from index.xml using XSLT stylesheets version 0
based on http://www.tei-c.org/Stylesheets/
on 1970-01-01.
SAXON.
--></address>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion Test/expected-results/test30.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ Elements] -->
calendar CDATA #IMPLIED
target CDATA #IMPLIED >
<!--doc:(choice) groups a number of alternative encodings for the same point in a text. [3.5. Simple Editorial Changes] -->
<!ELEMENT choice (%model.choicePart;|choice)+>
<!ELEMENT choice (%model.choicePart;|choice)>
<!ATTLIST choice xmlns CDATA "http://www.tei-c.org/ns/1.0">
<!ATTLIST choice
%Tatt.global.attributes; >
Expand Down
8 changes: 6 additions & 2 deletions Test/expected-results/test30.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -2819,7 +2819,11 @@ Tchoice =

## (choice) groups a number of alternative encodings for the same point in a text. [3.5. Simple Editorial Changes]
element choice {
(Tmodel.choicePart | Tchoice)+, Tatt.global.attributes, empty
(Tmodel.choicePart | Tchoice),
(Tmodel.choicePart | Tchoice),
(Tmodel.choicePart | Tchoice)*,
Tatt.global.attributes,
empty
}
Treg =

Expand Down Expand Up @@ -9514,7 +9518,7 @@ Tdiv =
element div {
((Tmodel.divTop | Tmodel.global)*,
((((Tmodel.divLike | Tmodel.divGenLike), Tmodel.global*)+
| (((Tmodel.common), Tmodel.global*)+,
| ((Tmodel.common, Tmodel.global*)+,
((Tmodel.divLike | Tmodel.divGenLike), Tmodel.global*)*)),
(Tmodel.divBottom, Tmodel.global*)*)?)
>> sch:pattern [
Expand Down
20 changes: 11 additions & 9 deletions Test/expected-results/test33.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -2545,7 +2545,9 @@ tei_choice =

## (choice) groups a number of alternative encodings for the same point in a text. [3.5. Simple Editorial Changes]
element tei:choice {
(tei_model.choicePart | tei_choice)+,
(tei_model.choicePart | tei_choice),
(tei_model.choicePart | tei_choice),
(tei_model.choicePart | tei_choice)*,
tei_att.global.attributes,
empty
}
Expand Down Expand Up @@ -5495,7 +5497,7 @@ tei_div =
element tei:div {
((tei_model.divTop | tei_model.global)*,
((((tei_model.divLike | tei_model.divGenLike), tei_model.global*)+
| (((tei_model.common), tei_model.global*)+,
| ((tei_model.common, tei_model.global*)+,
((tei_model.divLike | tei_model.divGenLike),
tei_model.global*)*)),
(tei_model.divBottom, tei_model.global*)*)?)
Expand Down Expand Up @@ -5556,7 +5558,7 @@ tei_div1 =
element tei:div1 {
((tei_model.divTop | tei_model.global)*,
((((tei_model.div2Like | tei_model.divGenLike), tei_model.global*)+
| (((tei_model.common), tei_model.global*)+,
| ((tei_model.common, tei_model.global*)+,
((tei_model.div2Like | tei_model.divGenLike),
tei_model.global*)*)),
(tei_model.divBottom, tei_model.global*)*)?),
Expand All @@ -5572,7 +5574,7 @@ tei_div2 =
element tei:div2 {
((tei_model.divTop | tei_model.global)*,
((((tei_model.div3Like | tei_model.divGenLike), tei_model.global*)+
| (((tei_model.common), tei_model.global*)+,
| ((tei_model.common, tei_model.global*)+,
((tei_model.div3Like | tei_model.divGenLike),
tei_model.global*)*)),
(tei_model.divBottom, tei_model.global*)*)?),
Expand All @@ -5588,7 +5590,7 @@ tei_div3 =
element tei:div3 {
((tei_model.divTop | tei_model.global)*,
((((tei_model.div4Like | tei_model.divGenLike), tei_model.global*)+
| (((tei_model.common), tei_model.global*)+,
| ((tei_model.common, tei_model.global*)+,
((tei_model.div4Like | tei_model.divGenLike),
tei_model.global*)*)),
(tei_model.divBottom, tei_model.global*)*)?),
Expand All @@ -5604,7 +5606,7 @@ tei_div4 =
element tei:div4 {
((tei_model.divTop | tei_model.global)*,
((((tei_model.div5Like | tei_model.divGenLike), tei_model.global*)+
| (((tei_model.common), tei_model.global*)+,
| ((tei_model.common, tei_model.global*)+,
((tei_model.div5Like | tei_model.divGenLike),
tei_model.global*)*)),
(tei_model.divBottom, tei_model.global*)*)?),
Expand All @@ -5620,7 +5622,7 @@ tei_div5 =
element tei:div5 {
((tei_model.divTop | tei_model.global)*,
((((tei_model.div6Like | tei_model.divGenLike), tei_model.global*)+
| (((tei_model.common), tei_model.global*)+,
| ((tei_model.common, tei_model.global*)+,
((tei_model.div6Like | tei_model.divGenLike),
tei_model.global*)*)),
(tei_model.divBottom, tei_model.global*)*)?),
Expand All @@ -5636,7 +5638,7 @@ tei_div6 =
element tei:div6 {
((tei_model.divTop | tei_model.global)*,
((((tei_model.div7Like | tei_model.divGenLike), tei_model.global*)+
| (((tei_model.common), tei_model.global*)+,
| ((tei_model.common, tei_model.global*)+,
((tei_model.div7Like | tei_model.divGenLike),
tei_model.global*)*)),
(tei_model.divBottom, tei_model.global*)*)?),
Expand All @@ -5651,7 +5653,7 @@ tei_div7 =
## (level-7 text division) contains the smallest possible subdivision of the front, body or back of a text, larger than a paragraph. [4.1.2. Numbered Divisions]
element tei:div7 {
((tei_model.divTop | tei_model.global)*,
(((tei_model.common), tei_model.global*)+,
((tei_model.common, tei_model.global*)+,
(tei_model.divBottom, tei_model.global*)*)?),
tei_att.global.attributes,
tei_att.divLike.attributes,
Expand Down
Loading
Loading