Skip to content

Commit

Permalink
61: Duplication Rules: fix categories/classes for identifiers
Browse files Browse the repository at this point in the history
Fix #61
  • Loading branch information
rolfkleef committed Dec 12, 2019
1 parent caed7ff commit 58a1462
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rules/iati/identifiers.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<xsl:template match="receiver-org/@ref" mode="rules" priority="1.15">
<xsl:call-template name="identifier_check">
<xsl:with-param name="item" select="."/>
<xsl:with-param name="class">organisation</xsl:with-param>
<xsl:with-param name="class">financial</xsl:with-param>
<xsl:with-param name="idclass">1.15</xsl:with-param>
</xsl:call-template>
<xsl:next-match/>
Expand Down Expand Up @@ -190,7 +190,7 @@
<xsl:template match="owner-org/@ref" mode="rules" priority="1.11">
<xsl:call-template name="identifier_check">
<xsl:with-param name="item" select="."/>
<xsl:with-param name="class">participating</xsl:with-param>
<xsl:with-param name="class">identifiers</xsl:with-param>
<xsl:with-param name="idclass">1.11</xsl:with-param>
</xsl:call-template>
<xsl:next-match/>
Expand All @@ -199,7 +199,7 @@
<xsl:template match="related-activity/@ref" mode="rules" priority="1.7">
<xsl:call-template name="act_identifier_check">
<xsl:with-param name="item" select="."/>
<xsl:with-param name="class">identifiers</xsl:with-param>
<xsl:with-param name="class">relations</xsl:with-param>
<xsl:with-param name="idclass">1.7</xsl:with-param>
</xsl:call-template>
<xsl:next-match/>
Expand Down
5 changes: 5 additions & 0 deletions tests/iati/organisation-identifiers.xspec
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,19 @@

<x:expect label="It should produce message 1.14.13 for reporting-org." test="boolean(//reporting-org/me:feedback[@id='1.14.13'])"/>
<x:expect label="It should be severity 'warning'." test="boolean(//reporting-org/me:feedback[@id='1.14.13']/@type='warning')"/>
<x:expect label="It should be class 'identifiers'." test="boolean(//reporting-org/me:feedback[@id='1.14.13']/@class='identifiers')"/>
<x:expect label="It should produce message 1.8.13 for participating-org." test="boolean(//participating-org/me:feedback[@id='1.8.13'])"/>
<x:expect label="It should be severity 'warning'." test="boolean(//participating-org/me:feedback[@id='1.8.13']/@type='warning')"/>
<x:expect label="It should be class 'participating'." test="boolean(//participating-org/me:feedback[@id='1.8.13']/@class='participating')"/>
<x:expect label="It should produce message 1.10.13 for provider-org." test="boolean(//provider-org/me:feedback[@id='1.10.13'])"/>
<x:expect label="It should be severity 'warning'." test="boolean(//provider-org/me:feedback[@id='1.10.13']/@type='warning')"/>
<x:expect label="It should be class 'financial'." test="boolean(//provider-org/me:feedback[@id='1.10.13']/@class='financial')"/>
<x:expect label="It should produce message 1.15.13 for receiver-org." test="boolean(//receiver-org/me:feedback[@id='1.15.13'])"/>
<x:expect label="It should be severity 'warning'." test="boolean(//receiver-org/me:feedback[@id='1.15.13']/@type='warning')"/>
<x:expect label="It should be class 'financial'." test="boolean(//receiver-org/me:feedback[@id='1.15.13']/@class='financial')"/>
<x:expect label="It should produce message 1.11.13 for owner-org." test="boolean(//owner-org/me:feedback[@id='1.11.13'])"/>
<x:expect label="It should be severity 'warning'." test="boolean(//owner-org/me:feedback[@id='1.11.13']/@type='warning')"/>
<x:expect label="It should be class 'identifiers'." test="boolean(//owner-org/me:feedback[@id='1.11.13']/@class='identifiers')"/>
</x:scenario>

<x:scenario label="If an organisation identifier in an organisations file contains forbidden characters">
Expand Down

0 comments on commit 58a1462

Please sign in to comment.