Skip to content

Commit

Permalink
Fix TEDSPD-583 Validation, Fix TEDSPD-569 #387 complement listVersionID
Browse files Browse the repository at this point in the history
Fix TEDSPD-583 Validation, Fix TEDSPD-569 #387 complement listVersionID
"./common/sch/04-ESPD-common-other-br.sch"
  • Loading branch information
Pascaline Laure Tchienehom committed Jul 24, 2023
1 parent a92ac5d commit 2ca5376
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
<xsl:value-of select="name(ancestor::*[1])"/>
<xsl:text/>/<xsl:text/>
<xsl:value-of select="name()"/>
<xsl:text/>' must have the following attribute and value: 'listURI = http://publications.europa.eu/resource/authority/access-right'.</svrl:text>
<xsl:text/>' must have the following attribute and value: 'listURI = http://publications.europa.eu/resource/dataset/access-right'.</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
Expand Down
4 changes: 2 additions & 2 deletions validation/ESPDRequest/xsl/04-ESPD-common-other-br.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
</xsl:template>

<!--RULE -->
<xsl:template match="cbc:ExpectedCode | cbc:IdentificationCode | cbc:ValueCurrencyCode | cbc:ProcedureCode | cbc:ProcurementTypeCode | cbc:ProcurementSubTypeCode"
<xsl:template match="cbc:ExpectedCode | cbc:IdentificationCode | cbc:DocumentTypeCode | cbc:ValueCurrencyCode | cbc:ProcedureCode | cbc:ProcurementTypeCode | cbc:ProcurementSubTypeCode"
priority="1003"
mode="M7">

Expand Down Expand Up @@ -358,7 +358,7 @@
</xsl:template>

<!--RULE -->
<xsl:template match="cbc:TypeCode | cbc:DocumentTypeCode | cbc:PropertyGroupTypeCode | cbc:ValueDataTypeCode"
<xsl:template match="cbc:TypeCode | cbc:PropertyGroupTypeCode | cbc:ValueDataTypeCode"
priority="1002"
mode="M7">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
<xsl:value-of select="name(ancestor::*[1])"/>
<xsl:text/>/<xsl:text/>
<xsl:value-of select="name()"/>
<xsl:text/>' must have the following attribute and value: 'listURI = http://publications.europa.eu/resource/authority/access-right'.</svrl:text>
<xsl:text/>' must have the following attribute and value: 'listURI = http://publications.europa.eu/resource/dataset/access-right'.</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
Expand Down
4 changes: 2 additions & 2 deletions validation/ESPDResponse/xsl/04-ESPD-common-other-br.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
</xsl:template>

<!--RULE -->
<xsl:template match="cbc:ExpectedCode | cbc:IdentificationCode | cbc:ValueCurrencyCode | cbc:ProcedureCode | cbc:ProcurementTypeCode | cbc:ProcurementSubTypeCode"
<xsl:template match="cbc:ExpectedCode | cbc:IdentificationCode | cbc:DocumentTypeCode | cbc:ValueCurrencyCode | cbc:ProcedureCode | cbc:ProcurementTypeCode | cbc:ProcurementSubTypeCode"
priority="1003"
mode="M7">

Expand Down Expand Up @@ -358,7 +358,7 @@
</xsl:template>

<!--RULE -->
<xsl:template match="cbc:TypeCode | cbc:DocumentTypeCode | cbc:PropertyGroupTypeCode | cbc:ValueDataTypeCode"
<xsl:template match="cbc:TypeCode | cbc:PropertyGroupTypeCode | cbc:ValueDataTypeCode"
priority="1002"
mode="M7">

Expand Down
2 changes: 1 addition & 1 deletion validation/common/sch/01-ESPD-common-cl-attributes.sch
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<assert test="(false() or not(@listID != 'http://publications.europa.eu/resource/authority/access-right'))" flag="fatal">Invalid codelist attribute value '<value-of select="@listID"/>'. The element '<value-of select="name(ancestor::*[1])"/>/<value-of select="name()"/>' must have the following attribute and value: 'listID = http://publications.europa.eu/resource/authority/access-right'.</assert>
<assert test="(false() or not(@listVersionID != '20220316-0'))" flag="fatal">Invalid codelist attribute value '<value-of select="@listVersionID"/>'. The element '<value-of select="name(ancestor::*[1])"/>/<value-of select="name()"/>' must have the following attribute and value: 'listVersionID = 20220316-0'.</assert>
<assert test="(false() or not(@listSchemeURI != 'http://publications.europa.eu/resource/distribution/access-right/20220316-0/xml/gc/AccessRight.gc'))" flag="fatal">Invalid codelist attribute value '<value-of select="@listSchemeURI"/>'. The element '<value-of select="name(ancestor::*[1])"/>/<value-of select="name()"/>' must have the following attribute and value: 'listSchemeURI = http://publications.europa.eu/resource/distribution/access-right/20220316-0/xml/gc/AccessRight.gc'.</assert>
<assert test="(false() or not(@listURI != 'http://publications.europa.eu/resource/dataset/access-right'))" flag="fatal">Invalid codelist attribute value '<value-of select="@listURI"/>'. The element '<value-of select="name(ancestor::*[1])"/>/<value-of select="name()"/>' must have the following attribute and value: 'listURI = http://publications.europa.eu/resource/authority/access-right'.</assert>
<assert test="(false() or not(@listURI != 'http://publications.europa.eu/resource/dataset/access-right'))" flag="fatal">Invalid codelist attribute value '<value-of select="@listURI"/>'. The element '<value-of select="name(ancestor::*[1])"/>/<value-of select="name()"/>' must have the following attribute and value: 'listURI = http://publications.europa.eu/resource/dataset/access-right'.</assert>
<assert test="(false() or not(@listAgencyName != 'Publications Office of the European Union'))" flag="fatal">Invalid codelist attribute value '<value-of select="@listAgencyName"/>'. The element '<value-of select="name(ancestor::*[1])"/>/<value-of select="name()"/>' must have the following attribute and value: 'listAgencyName = Publications Office of the European Union'.</assert>
<assert test="(false() or not(@listAgencyID != 'OP'))" flag="fatal">Invalid codelist attribute value '<value-of select="@listAgencyID"/>'. The element '<value-of select="name(ancestor::*[1])"/>/<value-of select="name()"/>' must have the following attribute and value: 'listAgencyID = OP'.</assert>
</rule>
Expand Down
4 changes: 2 additions & 2 deletions validation/common/sch/04-ESPD-common-other-br.sch
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
</rule>

<!-- BR-OTH-01: For codes, this ESPD V03.00.01 specification requires always three mandatory attributes: listID, listAgencyID, and listVersionID. -->
<rule context="cbc:ExpectedCode | cbc:IdentificationCode | cbc:ValueCurrencyCode | cbc:ProcedureCode | cbc:ProcurementTypeCode | cbc:ProcurementSubTypeCode">
<rule context="cbc:ExpectedCode | cbc:IdentificationCode | cbc:DocumentTypeCode | cbc:ValueCurrencyCode | cbc:ProcedureCode | cbc:ProcurementTypeCode | cbc:ProcurementSubTypeCode">
<assert test="@listID" flag="fatal" id="BR-OTH-01-10">The attribute listID is mandatory for the element: '<value-of select="name()"/>').</assert>
<assert test="@listAgencyID" flag="fatal" id="BR-OTH-01-20">The attribute listAgencyID is mandatory for the element: '<value-of select="name()"/>').</assert>
<assert test="@listVersionID" flag="fatal" id="BR-OTH-01-30">The attribute listVersionID is mandatory for the element: '<value-of select="name()"/>').</assert>
</rule>

<!-- BR-OTH-01: Code types listVersionID validation: starts with 3. -->
<rule context="cbc:TypeCode | cbc:DocumentTypeCode | cbc:PropertyGroupTypeCode | cbc:ValueDataTypeCode">
<rule context="cbc:TypeCode | cbc:PropertyGroupTypeCode | cbc:ValueDataTypeCode">
<assert test="@listID" flag="fatal" id="BR-OTH-01-11">The attribute listID is mandatory for the element: '<value-of select="name()"/>').</assert>
<assert test="@listAgencyID" flag="fatal" id="BR-OTH-01-21">The attribute listAgencyID is mandatory for the element: '<value-of select="name()"/>').</assert>
<assert test="@listVersionID" flag="fatal" id="BR-OTH-01-31">The attribute listVersionID is mandatory for the element: '<value-of select="name()"/>').</assert>
Expand Down

0 comments on commit 2ca5376

Please sign in to comment.