Skip to content

Commit

Permalink
Issue 399 rng annotations (TEIC#514)
Browse files Browse the repository at this point in the history
* First fix for issue TEIC#399: output code element contents with backticks.

* Fix expected results for issue TEIC#399 fix.

* Fixing tests for issue TEIC#399 fix.
  • Loading branch information
martindholmes authored Aug 20, 2021
1 parent 35b44e7 commit 8e2d56b
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Test/expected-results/test.rng
Original file line number Diff line number Diff line change
Expand Up @@ -3255,7 +3255,7 @@ Suggested values include: 1] volume (volume); 2] issue; 3] page (page); 4] line;
</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 or on the parent in the case of .</a:documentation>
<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>
Expand Down Expand Up @@ -5944,7 +5944,7 @@ Sample values include: 1] first-line; 2] first-letter; 3] before; 4] after</a:do
</rule>
</pattern>
<attribute name="match">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with ) or relative. <code xmlns="http://www.w3.org/1999/xhtml">@match</code> on a <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code> without a <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code> parent must be an absolute XPath. If it is relative, its context is set by the <code xmlns="http://www.w3.org/1999/xhtml">@match</code> of the parent <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code>.</a:documentation>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with `/`) or relative. <code xmlns="http://www.w3.org/1999/xhtml">@match</code> on a <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code> without a <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code> parent must be an absolute XPath. If it is relative, its context is set by the <code xmlns="http://www.w3.org/1999/xhtml">@match</code> of the parent <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code>.</a:documentation>
<text/>
</attribute>
<pattern xmlns="http://purl.oclc.org/dsdl/schematron" id="test-citeStructure-match-citestructure-outer-match-constraint-rule-13">
Expand Down
4 changes: 2 additions & 2 deletions Test/expected-results/test15.odd.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ att.citeStructurePart.attribute.use =
a:documentation [
"(use) supplies an XPath selection pattern using the syntax defined in . The XPath pattern is relative to the context given in "
ns1:code [ "@match" ]
", which will either be a sibling attribute in the case of or on the parent in the case of ."
", which will either be a sibling attribute in the case of `<citeStructure>` or on the parent `<citeStructure>` in the case of `<citeData>`."
]
]
attribute use { text }
Expand Down Expand Up @@ -3863,7 +3863,7 @@ citeStructure =
],
[
a:documentation [
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with ) or relative. "
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with `/`) or relative. "
ns1:code [ "@match" ]
" on a "
ns1:code [ "<citeStructure>" ]
Expand Down
8 changes: 4 additions & 4 deletions Test/expected-results/test21.odd.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -2053,7 +2053,7 @@ att.citeStructurePart.attribute.use =
a:documentation [
"(use) supplies an XPath selection pattern using the syntax defined in . The XPath pattern is relative to the context given in "
ns1:code [ "@match" ]
", which will either be a sibling attribute in the case of or on the parent in the case of ."
", which will either be a sibling attribute in the case of `<citeStructure>` or on the parent `<citeStructure>` in the case of `<citeData>`."
]
]
attribute use { text }
Expand Down Expand Up @@ -5565,7 +5565,7 @@ citeStructure =
],
[
a:documentation [
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with ) or relative. "
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with `/`) or relative. "
ns1:code [ "@match" ]
" on a "
ns1:code [ "<citeStructure>" ]
Expand Down Expand Up @@ -6482,11 +6482,11 @@ alt =
a:documentation [
"Si l'attribut "
ns1:code [ "@mode" ]
" a la valeur , chacune des valeurs de l'attribut "
" a la valeur `excl`, chacune des valeurs de l'attribut "
ns1:code [ "@weights" ]
" établit la probabilité que l'option correspondante soit vraie. Si l'attribut "
ns1:code [ "@mode" ]
" a la valeur , chacune des valeurs de l'attribut "
" a la valeur `incl`, chacune des valeurs de l'attribut "
ns1:code [ "@weights" ]
" établit la probabilité que l'option correspondante soit vraie, étant posé qu'au moins une des autres options l'est aussi."
]
Expand Down
4 changes: 2 additions & 2 deletions Test/expected-results/test30.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,7 @@ Tatt.citeStructurePart.attribute.use =
a:documentation [
"(use) supplies an XPath selection pattern using the syntax defined in . The XPath pattern is relative to the context given in "
ns1:code [ "@match" ]
", which will either be a sibling attribute in the case of or on the parent in the case of ."
", which will either be a sibling attribute in the case of `<citeStructure>` or on the parent `<citeStructure>` in the case of `<citeData>`."
]
]
attribute use { text }
Expand Down Expand Up @@ -4272,7 +4272,7 @@ TciteStructure =
],
[
a:documentation [
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with ) or relative. "
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with `/`) or relative. "
ns1:code [ "@match" ]
" on a "
ns1:code [ "<citeStructure>" ]
Expand Down
4 changes: 2 additions & 2 deletions Test/expected-results/test33.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -1758,7 +1758,7 @@ tei_att.citeStructurePart.attribute.use =
a:documentation [
"(use) supplies an XPath selection pattern using the syntax defined in . The XPath pattern is relative to the context given in "
ns1:code [ "@match" ]
", which will either be a sibling attribute in the case of or on the parent in the case of ."
", which will either be a sibling attribute in the case of `<citeStructure>` or on the parent `<citeStructure>` in the case of `<citeData>`."
]
]
attribute use { text }
Expand Down Expand Up @@ -4043,7 +4043,7 @@ tei_citeStructure =
],
[
a:documentation [
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with ) or relative. "
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with `/`) or relative. "
ns1:code [ "@match" ]
" on a "
ns1:code [ "<citeStructure>" ]
Expand Down
4 changes: 2 additions & 2 deletions Test/expected-results/test34.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -1763,7 +1763,7 @@ tei_att.citeStructurePart.attribute.use =
a:documentation [
"(use) supplies an XPath selection pattern using the syntax defined in . The XPath pattern is relative to the context given in "
ns1:code [ "@match" ]
", which will either be a sibling attribute in the case of or on the parent in the case of ."
", which will either be a sibling attribute in the case of `<citeStructure>` or on the parent `<citeStructure>` in the case of `<citeData>`."
]
]
attribute use { text }
Expand Down Expand Up @@ -4048,7 +4048,7 @@ tei_citeStructure =
],
[
a:documentation [
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with ) or relative. "
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with `/`) or relative. "
ns1:code [ "@match" ]
" on a "
ns1:code [ "<citeStructure>" ]
Expand Down
4 changes: 2 additions & 2 deletions Test/expected-results/test35.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@ tei_att.citeStructurePart.attribute.use =
a:documentation [
"(use) supplies an XPath selection pattern using the syntax defined in . The XPath pattern is relative to the context given in "
ns1:code [ "@match" ]
", which will either be a sibling attribute in the case of or on the parent in the case of ."
", which will either be a sibling attribute in the case of `<citeStructure>` or on the parent `<citeStructure>` in the case of `<citeData>`."
]
]
attribute use { text }
Expand Down Expand Up @@ -4022,7 +4022,7 @@ tei_citeStructure =
],
[
a:documentation [
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with ) or relative. "
"(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with `/`) or relative. "
ns1:code [ "@match" ]
" on a "
ns1:code [ "<citeStructure>" ]
Expand Down
4 changes: 2 additions & 2 deletions Test2/expected-results/testPure1.rng
Original file line number Diff line number Diff line change
Expand Up @@ -3002,7 +3002,7 @@ Suggested values include: 1] volume (volume); 2] issue; 3] page (page); 4] line;
</define>
<define name="t_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 or on the parent in the case of .</a:documentation>
<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>
Expand Down Expand Up @@ -5618,7 +5618,7 @@ Sample values include: 1] first-line; 2] first-letter; 3] before; 4] after</a:do
</rule>
</pattern>
<attribute name="match">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with ) or relative. <code xmlns="http://www.w3.org/1999/xhtml">@match</code> on a <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code> without a <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code> parent must be an absolute XPath. If it is relative, its context is set by the <code xmlns="http://www.w3.org/1999/xhtml">@match</code> of the parent <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code>.</a:documentation>
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(match) supplies an XPath selection pattern using the syntax defined in which identifies a set of nodes which are citable structural components. The expression may be absolute (beginning with `/`) or relative. <code xmlns="http://www.w3.org/1999/xhtml">@match</code> on a <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code> without a <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code> parent must be an absolute XPath. If it is relative, its context is set by the <code xmlns="http://www.w3.org/1999/xhtml">@match</code> of the parent <code xmlns="http://www.w3.org/1999/xhtml">&lt;citeStructure&gt;</code>.</a:documentation>
<text/>
</attribute>
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
Expand Down
1 change: 1 addition & 0 deletions odds/odd2relax.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ of this software, even if advised of the possibility of such damage.
<xsl:template name="refdoc"/>
<xsl:template name="typewriter">
<xsl:param name="text"/>
<xsl:sequence select="'`' || $text || '`'"/>
</xsl:template>

<xsl:template match="processing-instruction()" mode="tangle">
Expand Down

0 comments on commit 8e2d56b

Please sign in to comment.