Skip to content

Commit

Permalink
fixed an issue with a schematron report for notBefore gt notAfter
Browse files Browse the repository at this point in the history
reported by @solveigschreiter
  • Loading branch information
peterstadler committed Dec 21, 2017
1 parent 5c4d5c9 commit 7c19910
Show file tree
Hide file tree
Showing 45 changed files with 2,502 additions and 1,776 deletions.
25 changes: 15 additions & 10 deletions compiled-ODD/guidelines-de-wegaBiblio.compiled.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4418,17 +4418,22 @@ resource, either within the current document or elsewhere.</desc>
</exemplum><listRef>
<ref target="http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ND.html#NDPER">13.2.1. Personal Names</ref>
<ref target="http://www.tei-c.org/release/doc/tei-p5-doc/en/html/CO.html#CONARS">3.5.1. Referring Strings</ref>
</listRef></elementSpec><elementSpec rend="change" module="core" ident="date"><gloss versionDate="2009-01-06" xml:lang="fr">date</gloss><gloss versionDate="2016-11-25" xml:lang="de">Datum</gloss><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="en">contains a date in any format.</desc><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="de">enthält ein Datum in einem beliebigen Format.</desc><classes><memberOf key="att.global.responsibility"/><memberOf key="model.dateLike"/><memberOf key="att.datable"/></classes><content><alternate minOccurs="0" maxOccurs="unbounded"><textNode/><classRef key="model.gLike"/><classRef key="model.phrase"/><classRef key="model.global"/></alternate></content><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics1">
<desc versionDate="2013-11-11" xml:lang="en">checks for the existence of an <att>notBefore</att> with a <emph>larger</emph> value than its corresponding <att>notAfter</att> (for dates AC)</desc>
<desc versionDate="2013-11-11" xml:lang="de">sucht nach der Existenz eines <att>notBefore</att> mit einem <emph>größeren</emph> Wert als sein entsprechendes <att>notAfter</att> (für Daten n.Chr.)</desc>
</listRef></elementSpec><elementSpec rend="change" module="core" ident="date"><gloss versionDate="2009-01-06" xml:lang="fr">date</gloss><gloss versionDate="2016-11-25" xml:lang="de">Datum</gloss><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="en">contains a date in any format.</desc><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="de">enthält ein Datum in einem beliebigen Format.</desc><classes><memberOf key="att.global.responsibility"/><memberOf key="model.dateLike"/><memberOf key="att.datable"/></classes><content><alternate minOccurs="0" maxOccurs="unbounded"><textNode/><classRef key="model.gLike"/><classRef key="model.phrase"/><classRef key="model.global"/></alternate></content><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics2">
<desc versionDate="2013-11-11" xml:lang="en">checks for the existence of an <att>notBefore</att> with a <emph>smaller</emph> date value than its corresponding <att>notAfter</att></desc>
<desc versionDate="2013-11-11" xml:lang="de">sucht nach der Existenz eines <att>notBefore</att> mit einem <emph>kleineren</emph> Datumswert als sein entsprechendes <att>notAfter</att></desc>
<constraint>
<sch:report test="(@notBefore gt @notAfter) and not(starts-with(@notBefore, '-'))">value of notBefore greater than notAfter</sch:report>
</constraint>
</constraintSpec><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics2">
<desc versionDate="2013-11-11" xml:lang="en">checks for the existence of an <att>notBefore</att> with a <emph>smaller</emph> value than its corresponding <att>notAfter</att> (for dates BC)</desc>
<desc versionDate="2013-11-11" xml:lang="de">sucht nach der Existenz eines <att>notBefore</att> mit einem <emph>kleineren</emph> Wert als sein entsprechendes <att>notAfter</att> (für Daten v.Chr.)</desc>
<constraint>
<sch:report test="(@notBefore lt @notAfter) and starts-with(@notBefore, '-')">value of notBefore smaller than notAfter</sch:report>
<sch:rule context="tei:date[@notBefore castable as xs:date and @notAfter castable as xs:date]">
<sch:report test="xs:date(@notBefore) gt xs:date(@notAfter)">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
<sch:rule context="tei:date[@notBefore castable as xs:gYear and @notAfter castable as xs:gYear]">
<sch:report test="xs:date(concat(@notBefore, '-01-01')) gt xs:date(concat(@notAfter, '-01-01'))">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
<sch:rule context="tei:date[@notBefore castable as xs:gYear and @notAfter castable as xs:date]">
<sch:report test="xs:date(concat(@notBefore, '-01-01')) gt xs:date(@notAfter)">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
<sch:rule context="tei:date[@notBefore castable as xs:date and @notAfter castable as xs:gYear]">
<sch:report test="xs:date(@notBefore) gt xs:date(concat(@notAfter, '-12-31'))">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
</constraint>
</constraintSpec><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics3">
<desc versionDate="2013-11-11" xml:lang="en">checks for the cooccurence of date and duration attributes</desc>
Expand Down
25 changes: 15 additions & 10 deletions compiled-ODD/guidelines-de-wegaDiaries.compiled.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6125,17 +6125,22 @@ concerned, as further discussed in section <ref target="http://www.tei-c.org/rel
</exemplum><listRef>
<ref target="http://www.tei-c.org/release/doc/tei-p5-doc/en/html/CO.html#CONANU">3.5.3. Numbers and
Measures</ref>
</listRef></elementSpec><elementSpec rend="change" module="core" ident="date"><gloss versionDate="2009-01-06" xml:lang="fr">date</gloss><gloss versionDate="2016-11-25" xml:lang="de">Datum</gloss><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="en">contains a date in any format.</desc><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="de">enthält ein Datum in einem beliebigen Format.</desc><classes><memberOf key="att.global.responsibility"/><memberOf key="model.dateLike"/><memberOf key="att.datable"/></classes><content><alternate minOccurs="0" maxOccurs="unbounded"><textNode/><classRef key="model.gLike"/><classRef key="model.phrase"/><classRef key="model.global"/></alternate></content><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics1">
<desc versionDate="2013-11-11" xml:lang="en">checks for the existence of an <att>notBefore</att> with a <emph>larger</emph> value than its corresponding <att>notAfter</att> (for dates AC)</desc>
<desc versionDate="2013-11-11" xml:lang="de">sucht nach der Existenz eines <att>notBefore</att> mit einem <emph>größeren</emph> Wert als sein entsprechendes <att>notAfter</att> (für Daten n.Chr.)</desc>
</listRef></elementSpec><elementSpec rend="change" module="core" ident="date"><gloss versionDate="2009-01-06" xml:lang="fr">date</gloss><gloss versionDate="2016-11-25" xml:lang="de">Datum</gloss><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="en">contains a date in any format.</desc><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="de">enthält ein Datum in einem beliebigen Format.</desc><classes><memberOf key="att.global.responsibility"/><memberOf key="model.dateLike"/><memberOf key="att.datable"/></classes><content><alternate minOccurs="0" maxOccurs="unbounded"><textNode/><classRef key="model.gLike"/><classRef key="model.phrase"/><classRef key="model.global"/></alternate></content><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics2">
<desc versionDate="2013-11-11" xml:lang="en">checks for the existence of an <att>notBefore</att> with a <emph>smaller</emph> date value than its corresponding <att>notAfter</att></desc>
<desc versionDate="2013-11-11" xml:lang="de">sucht nach der Existenz eines <att>notBefore</att> mit einem <emph>kleineren</emph> Datumswert als sein entsprechendes <att>notAfter</att></desc>
<constraint>
<sch:report test="(@notBefore gt @notAfter) and not(starts-with(@notBefore, '-'))">value of notBefore greater than notAfter</sch:report>
</constraint>
</constraintSpec><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics2">
<desc versionDate="2013-11-11" xml:lang="en">checks for the existence of an <att>notBefore</att> with a <emph>smaller</emph> value than its corresponding <att>notAfter</att> (for dates BC)</desc>
<desc versionDate="2013-11-11" xml:lang="de">sucht nach der Existenz eines <att>notBefore</att> mit einem <emph>kleineren</emph> Wert als sein entsprechendes <att>notAfter</att> (für Daten v.Chr.)</desc>
<constraint>
<sch:report test="(@notBefore lt @notAfter) and starts-with(@notBefore, '-')">value of notBefore smaller than notAfter</sch:report>
<sch:rule context="tei:date[@notBefore castable as xs:date and @notAfter castable as xs:date]">
<sch:report test="xs:date(@notBefore) gt xs:date(@notAfter)">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
<sch:rule context="tei:date[@notBefore castable as xs:gYear and @notAfter castable as xs:gYear]">
<sch:report test="xs:date(concat(@notBefore, '-01-01')) gt xs:date(concat(@notAfter, '-01-01'))">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
<sch:rule context="tei:date[@notBefore castable as xs:gYear and @notAfter castable as xs:date]">
<sch:report test="xs:date(concat(@notBefore, '-01-01')) gt xs:date(@notAfter)">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
<sch:rule context="tei:date[@notBefore castable as xs:date and @notAfter castable as xs:gYear]">
<sch:report test="xs:date(@notBefore) gt xs:date(concat(@notAfter, '-12-31'))">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
</constraint>
</constraintSpec><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics3">
<desc versionDate="2013-11-11" xml:lang="en">checks for the cooccurence of date and duration attributes</desc>
Expand Down
25 changes: 15 additions & 10 deletions compiled-ODD/guidelines-de-wegaDocuments.compiled.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6835,17 +6835,22 @@ TOURS</addrLine>
<listRef>
<ref target="http://www.tei-c.org/release/doc/tei-p5-doc/en/html/CO.html#CONAAD">3.5.2. Addresses</ref>
</listRef>
</elementSpec><elementSpec rend="change" module="core" ident="date"><gloss versionDate="2009-01-06" xml:lang="fr">date</gloss><gloss versionDate="2016-11-25" xml:lang="de">Datum</gloss><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="en">contains a date in any format.</desc><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="de">enthält ein Datum in einem beliebigen Format.</desc><classes><memberOf key="att.global.responsibility"/><memberOf key="model.dateLike"/><memberOf key="model.publicationStmtPart.detail"/><memberOf key="att.datable"/></classes><content><alternate minOccurs="0" maxOccurs="unbounded"><textNode/><classRef key="model.gLike"/><classRef key="model.phrase"/><classRef key="model.global"/></alternate></content><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics1">
<desc versionDate="2013-11-11" xml:lang="en">checks for the existence of an <att>notBefore</att> with a <emph>larger</emph> value than its corresponding <att>notAfter</att> (for dates AC)</desc>
<desc versionDate="2013-11-11" xml:lang="de">sucht nach der Existenz eines <att>notBefore</att> mit einem <emph>größeren</emph> Wert als sein entsprechendes <att>notAfter</att> (für Daten n.Chr.)</desc>
</elementSpec><elementSpec rend="change" module="core" ident="date"><gloss versionDate="2009-01-06" xml:lang="fr">date</gloss><gloss versionDate="2016-11-25" xml:lang="de">Datum</gloss><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="en">contains a date in any format.</desc><desc xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" rend="replace" versionDate="2013-11-11" xml:lang="de">enthält ein Datum in einem beliebigen Format.</desc><classes><memberOf key="att.global.responsibility"/><memberOf key="model.dateLike"/><memberOf key="model.publicationStmtPart.detail"/><memberOf key="att.datable"/></classes><content><alternate minOccurs="0" maxOccurs="unbounded"><textNode/><classRef key="model.gLike"/><classRef key="model.phrase"/><classRef key="model.global"/></alternate></content><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics2">
<desc versionDate="2013-11-11" xml:lang="en">checks for the existence of an <att>notBefore</att> with a <emph>smaller</emph> date value than its corresponding <att>notAfter</att></desc>
<desc versionDate="2013-11-11" xml:lang="de">sucht nach der Existenz eines <att>notBefore</att> mit einem <emph>kleineren</emph> Datumswert als sein entsprechendes <att>notAfter</att></desc>
<constraint>
<sch:report test="(@notBefore gt @notAfter) and not(starts-with(@notBefore, '-'))">value of notBefore greater than notAfter</sch:report>
</constraint>
</constraintSpec><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics2">
<desc versionDate="2013-11-11" xml:lang="en">checks for the existence of an <att>notBefore</att> with a <emph>smaller</emph> value than its corresponding <att>notAfter</att> (for dates BC)</desc>
<desc versionDate="2013-11-11" xml:lang="de">sucht nach der Existenz eines <att>notBefore</att> mit einem <emph>kleineren</emph> Wert als sein entsprechendes <att>notAfter</att> (für Daten v.Chr.)</desc>
<constraint>
<sch:report test="(@notBefore lt @notAfter) and starts-with(@notBefore, '-')">value of notBefore smaller than notAfter</sch:report>
<sch:rule context="tei:date[@notBefore castable as xs:date and @notAfter castable as xs:date]">
<sch:report test="xs:date(@notBefore) gt xs:date(@notAfter)">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
<sch:rule context="tei:date[@notBefore castable as xs:gYear and @notAfter castable as xs:gYear]">
<sch:report test="xs:date(concat(@notBefore, '-01-01')) gt xs:date(concat(@notAfter, '-01-01'))">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
<sch:rule context="tei:date[@notBefore castable as xs:gYear and @notAfter castable as xs:date]">
<sch:report test="xs:date(concat(@notBefore, '-01-01')) gt xs:date(@notAfter)">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
<sch:rule context="tei:date[@notBefore castable as xs:date and @notAfter castable as xs:gYear]">
<sch:report test="xs:date(@notBefore) gt xs:date(concat(@notAfter, '-12-31'))">the date value of notBefore is later than notAfter</sch:report>
</sch:rule>
</constraint>
</constraintSpec><constraintSpec xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:s="http://www.ascc.net/xml/schematron" scheme="schematron" ident="dateHeuristics3">
<desc versionDate="2013-11-11" xml:lang="en">checks for the cooccurence of date and duration attributes</desc>
Expand Down
Loading

0 comments on commit 7c19910

Please sign in to comment.