Skip to content

Commit

Permalink
Merge branch 'release-7.47.0'
Browse files Browse the repository at this point in the history
Fixing issues with the tests, which surfaced with TEI 3.5.0.
  • Loading branch information
hcayless committed Jan 29, 2019
2 parents 642a8b4 + 466a672 commit a5c13d3
Show file tree
Hide file tree
Showing 16 changed files with 1,149 additions and 460 deletions.
1 change: 1 addition & 0 deletions Test/expected-results/oddbyexample.odd
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
<attDef ident="type" mode="delete"/>
</attList>
</elementSpec>
<!--Checking module figures-->
<!--Checking module header-->
<moduleRef key="header"
include="teiHeader fileDesc titleStmt publicationStmt sourceDesc"/>
Expand Down
47 changes: 28 additions & 19 deletions Test/expected-results/test.isosch
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,34 @@ The element indicated by @spanTo (<value-of select="@spanTo"/>) must follow the
</report>
</rule>
</pattern>
<pattern id="schematron-constraint-test-ptr-ptrAtts-12">
<pattern id="schematron-constraint-test-desc-deprecationInfo-only-in-deprecated-12">
<rule context="tei:desc[ @type eq 'deprecationInfo']">
<assert test="../@validUntil">Information about a
deprecation should only be present in a specification element
that is being deprecated: that is, only an element that has a
@validUntil attribute should have a child &lt;desc
type="deprecationInfo"&gt;.</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-test-ptr-ptrAtts-13">
<rule context="tei:ptr">
<report test="@target and @cRef">Only one of the
attributes @target and @cRef may be supplied on <name/>.</report>
</rule>
</pattern>
<pattern id="schematron-constraint-test-ref-refAtts-13">
<pattern id="schematron-constraint-test-ref-refAtts-14">
<rule context="tei:ref">
<report test="@target and @cRef">Only one of the
attributes @target' and @cRef' may be supplied on <name/>
</report>
</rule>
</pattern>
<pattern id="schematron-constraint-test-list-gloss-list-must-have-labels-14">
<pattern id="schematron-constraint-test-list-gloss-list-must-have-labels-15">
<rule context="tei:list[@type='gloss']">
<assert test="tei:label">The content of a "gloss" list should include a sequence of one or more pairs of a label element followed by an item element</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-test-relatedItem-targetorcontent1-15">
<pattern id="schematron-constraint-test-relatedItem-targetorcontent1-16">
<rule context="tei:relatedItem">
<report test="@target and count( child::* ) &gt; 0">
If the @target attribute on <name/> is used, the
Expand All @@ -113,33 +122,33 @@ relatedItem element must be empty</report>
or a child element to indicate the related bibliographic item</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-test-l-abstractModel-structure-l-16">
<pattern id="schematron-constraint-test-l-abstractModel-structure-l-17">
<rule context="tei:l">
<report test="ancestor::tei:l[not(.//tei:note//tei:l[. = current()])]">
Abstract model violation: Lines may not contain lines or lg elements.
</report>
</rule>
</pattern>
<pattern id="schematron-constraint-test-lg-atleast1oflggapl-17">
<pattern id="schematron-constraint-test-lg-atleast1oflggapl-18">
<rule context="tei:lg">
<assert test="count(descendant::tei:lg|descendant::tei:l|descendant::tei:gap) &gt; 0">An lg element
must contain at least one child l, lg or gap element.</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-test-lg-abstractModel-structure-l-18">
<pattern id="schematron-constraint-test-lg-abstractModel-structure-l-19">
<rule context="tei:lg">
<report test="ancestor::tei:l[not(.//tei:note//tei:lg[. = current()])]">
Abstract model violation: Lines may not contain line groups.
</report>
</rule>
</pattern>
<pattern id="schematron-constraint-test-quotation-quotationContents-19">
<pattern id="schematron-constraint-test-quotation-quotationContents-20">
<rule context="tei:quotation">
<report test="not(@marks) and not (tei:p)">
On <name/>, either the @marks attribute should be used, or a paragraph of description provided</report>
</rule>
</pattern>
<pattern id="schematron-constraint-test-path-pathmustnotbeclosed-20">
<pattern id="schematron-constraint-test-path-pathmustnotbeclosed-21">
<rule context="tei:path[@points]">

<let name="firstPair" value="tokenize( normalize-space( @points ), ' ')[1]"/>
Expand All @@ -154,23 +163,23 @@ On <name/>, either the @marks attribute should be used, or a paragraph of descri
the zone element rather than the path element. </report>
</rule>
</pattern>
<pattern id="schematron-constraint-test-addSpan-spanTo-21">
<pattern id="schematron-constraint-test-addSpan-spanTo-22">
<rule context="tei:addSpan">
<assert test="@spanTo">The @spanTo attribute of <name/> is required.</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-test-damageSpan-spanTo-23">
<pattern id="schematron-constraint-test-damageSpan-spanTo-24">
<rule context="tei:damageSpan">
<assert test="@spanTo">
The @spanTo attribute of <name/> is required.</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-test-delSpan-spanTo-25">
<pattern id="schematron-constraint-test-delSpan-spanTo-26">
<rule context="tei:delSpan">
<assert test="@spanTo">The @spanTo attribute of <name/> is required.</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-test-subst-substContents1-27">
<pattern id="schematron-constraint-test-subst-substContents1-28">
<rule context="tei:subst">
<assert test="child::tei:add and child::tei:del">
<name/> must have at least one child add and at least one child del</assert>
Expand All @@ -180,41 +189,41 @@ The @spanTo attribute of <name/> is required.</assert>



<pattern id="schematron-constraint-test-div-abstractModel-structure-l-30">
<pattern id="schematron-constraint-test-div-abstractModel-structure-l-31">
<rule context="tei:div">
<report test="ancestor::tei:l">
Abstract model violation: Lines may not contain higher-level structural elements such as div.
</report>
</rule>
</pattern>
<pattern id="schematron-constraint-test-div-abstractModel-structure-p-31">
<pattern id="schematron-constraint-test-div-abstractModel-structure-p-32">
<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>
</rule>
</pattern>
<pattern id="schematron-constraint-test-link-linkTargets3-32">
<pattern id="schematron-constraint-test-link-linkTargets3-33">
<rule context="tei:link">
<assert test="contains(normalize-space(@target),' ')">You must supply at least two values for @target or on <name/>
</assert>
</rule>
</pattern>
<pattern id="schematron-constraint-test-ab-abstractModel-structure-ab-33">
<pattern id="schematron-constraint-test-ab-abstractModel-structure-ab-34">
<rule context="tei:ab">
<report test="not(ancestor::tei:floatingText) and (ancestor::tei:p or ancestor::tei:ab) and not(parent::tei:exemplum |parent::tei:item |parent::tei:note |parent::tei:q |parent::tei:quote |parent::tei:remarks |parent::tei:said |parent::tei:sp |parent::tei:stage |parent::tei:cell |parent::tei:figure)">
Abstract model violation: ab may not occur inside paragraphs or other ab elements.
</report>
</rule>
</pattern>
<pattern id="schematron-constraint-test-ab-abstractModel-structure-l-34">
<pattern id="schematron-constraint-test-ab-abstractModel-structure-l-35">
<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>
</rule>
</pattern>
<pattern id="schematron-constraint-test-join-joinTargets3-35">
<pattern id="schematron-constraint-test-join-joinTargets3-36">
<rule context="tei:join">
<assert test="contains(@target,' ')">
You must supply at least two values for @target on <name/>
Expand Down
Loading

0 comments on commit a5c13d3

Please sign in to comment.