Skip to content

Commit

Permalink
Merge pull request #522 from TEIC/P5subset
Browse files Browse the repository at this point in the history
Update of the p5subset
  • Loading branch information
ebeshero authored Aug 29, 2021
2 parents 0e6740e + d111535 commit a2474cd
Show file tree
Hide file tree
Showing 17 changed files with 928 additions and 542 deletions.
16 changes: 8 additions & 8 deletions Test/expected-results/test.isosch
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ The element indicated by @spanTo (<value-of select="@spanTo"/>) must follow the
</pattern>
<pattern id="schematron-constraint-test-p-abstractModel-structure-l-11">
<rule context="tei:p">
<report test="ancestor::tei:l[not(.//tei:note//tei:p[. = current()])]">
Abstract model violation: Lines may not contain higher-level structural elements such as div, p, or ab.
<report test="(ancestor::tei:l or ancestor::tei:lg) and not(parent::tei:figure or parent::tei:note or ancestor::tei:floatingText)">
Abstract model violation: Lines may not contain higher-level structural elements such as div, p, or ab, unless p is a child of figure or note, or is a descendant of floatingText.
</report>
</rule>
</pattern>
Expand Down Expand Up @@ -213,15 +213,15 @@ The @spanTo attribute of <name/> is required.</assert>
</pattern>
<pattern id="schematron-constraint-test-div-abstractModel-structure-l-37">
<rule context="tei:div">
<report test="ancestor::tei:l">
Abstract model violation: Lines may not contain higher-level structural elements such as div.
<report test="(ancestor::tei:l or ancestor::tei:lg) and not(ancestor::tei:floatingText)">
Abstract model violation: Lines may not contain higher-level structural elements such as div, unless div is a descendant of floatingText.
</report>
</rule>
</pattern>
<pattern id="schematron-constraint-test-div-abstractModel-structure-p-38">
<rule context="tei:div">
<report test="ancestor::tei:p or ancestor::tei:ab and not(ancestor::tei:floatingText)">
Abstract model violation: p and ab may not contain higher-level structural elements such as div.
<report test="(ancestor::tei:p or ancestor::tei:ab) and not(ancestor::tei:floatingText)">
Abstract model violation: p and ab may not contain higher-level structural elements such as div, unless div is a descendant of floatingText.
</report>
</rule>
</pattern>
Expand All @@ -240,8 +240,8 @@ The @spanTo attribute of <name/> is required.</assert>
</pattern>
<pattern id="schematron-constraint-test-ab-abstractModel-structure-l-41">
<rule context="tei:ab">
<report test="ancestor::tei:l or ancestor::tei:lg">
Abstract model violation: Lines may not contain higher-level divisions such as p or ab.
<report test="(ancestor::tei:l or ancestor::tei:lg) and not(parent::tei:figure or parent::tei:note or ancestor::tei:floatingText)">
Abstract model violation: Lines may not contain higher-level divisions such as p or ab, unless ab is a child of figure or note, or is a descendant of floatingText.
</report>
</rule>
</pattern>
Expand Down
36 changes: 21 additions & 15 deletions Test/expected-results/test.odd.html

Large diffs are not rendered by default.

69 changes: 52 additions & 17 deletions Test/expected-results/test.rng
Original file line number Diff line number Diff line change
Expand Up @@ -2598,6 +2598,7 @@ Suggested values include: 1] volume (volume); 2] issue; 3] page (page); 4] line;
<define name="model.global.edit">
<choice>
<ref name="gap"/>
<ref name="ellipsis"/>
<ref name="addSpan"/>
<ref name="damageSpan"/>
<ref name="delSpan"/>
Expand Down Expand Up @@ -3250,15 +3251,6 @@ Suggested values include: 1] volume (volume); 2] issue; 3] page (page); 4] line;
<ref name="model.entryLike"/>
</choice>
</define>
<define name="att.citeStructurePart.attributes">
<ref name="att.citeStructurePart.attribute.use"/>
</define>
<define name="att.citeStructurePart.attribute.use">
<attribute name="use">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(use) supplies an XPath selection pattern using the syntax defined in . The XPath pattern is relative to the context given in <code xmlns="http://www.w3.org/1999/xhtml">@match</code>, which will either be a sibling attribute in the case of `&lt;citeStructure&gt;` or on the parent `&lt;citeStructure&gt;` in the case of `&lt;citeData&gt;`.</a:documentation>
<text/>
</attribute>
</define>
<define name="att.formula.attributes">
<ref name="att.formula.attribute.formula"/>
</define>
Expand All @@ -3270,6 +3262,21 @@ Suggested values include: 1] volume (volume); 2] issue; 3] page (page); 4] line;
</attribute>
</optional>
</define>
<define name="att.locatable.attributes">
<ref name="att.locatable.attribute.where"/>
</define>
<define name="att.locatable.attribute.where">
<optional>
<attribute name="where">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates one or more locations by pointing to a <code xmlns="http://www.w3.org/1999/xhtml">&lt;place&gt;</code> element or other canonical description.</a:documentation>
<list>
<oneOrMore>
<data type="anyURI"/>
</oneOrMore>
</list>
</attribute>
</optional>
</define>
<define name="model.correspActionPart">
<choice>
<ref name="model.dateLike"/>
Expand Down Expand Up @@ -3416,8 +3423,8 @@ Suggested values include: 1] page; 2] column; 3] line; 4] book; 5] poem; 6] cant
</pattern>
<pattern xmlns="http://purl.oclc.org/dsdl/schematron" id="test-p-abstractModel-structure-l-constraint-report-6">
<rule context="tei:p">
<report xmlns:rng="http://relaxng.org/ns/structure/1.0" test="ancestor::tei:l[not(.//tei:note//tei:p[. = current()])]">
Abstract model violation: Lines may not contain higher-level structural elements such as div, p, or ab.
<report xmlns:rng="http://relaxng.org/ns/structure/1.0" test="(ancestor::tei:l or ancestor::tei:lg) and not(parent::tei:figure or parent::tei:note or ancestor::tei:floatingText)">
Abstract model violation: Lines may not contain higher-level structural elements such as div, p, or ab, unless p is a child of figure or note, or is a descendant of floatingText.
</report>
</rule>
</pattern>
Expand Down Expand Up @@ -3842,6 +3849,24 @@ Sample values include: 1] rubbing (rubbing); 2] mildew (mildew); 3] smoke (smoke
<empty/>
</element>
</define>
<define name="ellipsis">
<element name="ellipsis">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(deliberately marked omission) indicates a purposeful marking in the source document signalling that content has been omitted, and may also supply or describe the omitted content. [3.5.3. Additions, Deletions, and Omissions]</a:documentation>
<group>
<ref name="metamark"/>
<optional>
<ref name="model.descLike"/>
</optional>
<optional>
<ref name="supplied"/>
</optional>
</group>
<ref name="att.global.attributes"/>
<ref name="att.dimensions.attributes"/>
<ref name="att.timed.attributes"/>
<empty/>
</element>
</define>
<define name="add">
<element name="add">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(addition) contains letters, words, or phrases inserted in the source text by an author, scribe, or a previous annotator or corrector. [3.5.3. Additions, Deletions, and Omissions]</a:documentation>
Expand Down Expand Up @@ -5190,6 +5215,15 @@ Sample values include: 1] index; 2] toc; 3] figlist; 4] tablist</a:documentation
<empty/>
</element>
</define>
<define name="att.citeStructurePart.attributes">
<ref name="att.citeStructurePart.attribute.use"/>
</define>
<define name="att.citeStructurePart.attribute.use">
<attribute name="use">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(use) supplies an XPath selection pattern using the syntax defined in . The XPath pattern is relative to the context given in <code xmlns="http://www.w3.org/1999/xhtml">@match</code>, which will either be a sibling attribute in the case of `&lt;citeStructure&gt;` or on the parent `&lt;citeStructure&gt;` in the case of `&lt;citeData&gt;`.</a:documentation>
<text/>
</attribute>
</define>
<define name="att.patternReplacement.attributes">
<ref name="att.patternReplacement.attribute.matchPattern"/>
<ref name="att.patternReplacement.attribute.replacementPattern"/>
Expand Down Expand Up @@ -6209,6 +6243,7 @@ Suggested values include: 1] WGS84 (World Geodetic System); 2] MGRS (Military Gr
<ref name="att.global.attributes"/>
<ref name="att.datable.attributes"/>
<ref name="att.formula.attributes"/>
<ref name="att.locatable.attributes"/>
<attribute name="fromUnit">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates a source unit of measure that is to be converted into another unit indicated in <code xmlns="http://www.w3.org/1999/xhtml">@toUnit</code>.</a:documentation>
<data type="anyURI"/>
Expand Down Expand Up @@ -8107,15 +8142,15 @@ Suggested values include: 1] initial; 2] final</a:documentation>
</group>
<pattern xmlns="http://purl.oclc.org/dsdl/schematron" id="test-div-abstractModel-structure-l-constraint-report-15">
<rule context="tei:div">
<report xmlns:rng="http://relaxng.org/ns/structure/1.0" test="ancestor::tei:l">
Abstract model violation: Lines may not contain higher-level structural elements such as div.
<report xmlns:rng="http://relaxng.org/ns/structure/1.0" test="(ancestor::tei:l or ancestor::tei:lg) and not(ancestor::tei:floatingText)">
Abstract model violation: Lines may not contain higher-level structural elements such as div, unless div is a descendant of floatingText.
</report>
</rule>
</pattern>
<pattern xmlns="http://purl.oclc.org/dsdl/schematron" id="test-div-abstractModel-structure-p-constraint-report-16">
<rule context="tei:div">
<report xmlns:rng="http://relaxng.org/ns/structure/1.0" test="ancestor::tei:p or ancestor::tei:ab and not(ancestor::tei:floatingText)">
Abstract model violation: p and ab may not contain higher-level structural elements such as div.
<report xmlns:rng="http://relaxng.org/ns/structure/1.0" test="(ancestor::tei:p or ancestor::tei:ab) and not(ancestor::tei:floatingText)">
Abstract model violation: p and ab may not contain higher-level structural elements such as div, unless div is a descendant of floatingText.
</report>
</rule>
</pattern>
Expand Down Expand Up @@ -9120,8 +9155,8 @@ Suggested values include: 1] main (main); 2] sub (subordinate); 3] alt (alternat
</pattern>
<pattern xmlns="http://purl.oclc.org/dsdl/schematron" id="test-ab-abstractModel-structure-l-constraint-report-18">
<rule context="tei:ab">
<report xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:xi="http://www.w3.org/2001/XInclude" test="ancestor::tei:l or ancestor::tei:lg">
Abstract model violation: Lines may not contain higher-level divisions such as p or ab.
<report xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:xi="http://www.w3.org/2001/XInclude" test="(ancestor::tei:l or ancestor::tei:lg) and not(parent::tei:figure or parent::tei:note or ancestor::tei:floatingText)">
Abstract model violation: Lines may not contain higher-level divisions such as p or ab, unless ab is a child of figure or note, or is a descendant of floatingText.
</report>
</rule>
</pattern>
Expand Down
Loading

0 comments on commit a2474cd

Please sign in to comment.