Skip to content

Commit

Permalink
add rules CII-SR-457 and CII-SR-458 closes #353
Browse files Browse the repository at this point in the history
  • Loading branch information
oriol committed Sep 28, 2023
1 parent 97511c7 commit 9b2f4dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cii/schematron/CII/EN16931-CII-syntax.sch
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@
<param name="CII-SR-450" value="(not(ram:BuyerTradeParty/ram:ID) and ram:BuyerTradeParty/ram:GlobalID) or (ram:BuyerTradeParty/ram:ID and not(ram:BuyerTradeParty/ram:GlobalID)) or (not(ram:BuyerTradeParty/ram:ID) and not(ram:BuyerTradeParty/ram:GlobalID))"/>
<param name="CII-SR-455" value="( count(ram:SellerTradeParty/ram:DefinedTradeContact) &lt;= 1)"/>
<param name="CII-SR-456" value="( count(ram:BuyerTradeParty/ram:DefinedTradeContact) &lt;= 1)"/>
<param name="CII-SR-457" value="( count(ram:AdditionalReferencedDocument[ram:TypeCode='50']) &lt;= 1)"/>
<param name="CII-SR-458" value="( count(ram:AdditionalReferencedDocument[ram:TypeCode='130']) &lt;= 1)"/>

<!-- ApplicableHeaderTradeDelivery -->
<param name="CII-SR-308" value="not(ram:RelatedSupplyChainConsignment)"/>
Expand Down
3 changes: 3 additions & 0 deletions cii/schematron/abstract/EN16931-CII-syntax.sch
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@
<assert test="$CII-SR-450" flag="warning" id="CII-SR-450">[CII-SR-450] - Only one buyer identifier should be present (either the ID or the Global ID)</assert>
<assert test="$CII-SR-455" flag="fatal" id="CII-SR-455">[CII-SR-455] - DefinedTradeContact of SellerTradeParty shall exist maximum once</assert>
<assert test="$CII-SR-456" flag="fatal" id="CII-SR-456">[CII-SR-456] - DefinedTradeContact of BuyerTradeParty shall exist maximum once</assert>
<assert test="$CII-SR-457" flag="warning" id="CII-SR-457">[CII-SR-457] - IssuerAssignedID with TypeCode 50 should exist maximum once</assert>
<assert test="$CII-SR-458" flag="warning" id="CII-SR-458">[CII-SR-458] - IssuerAssignedID with TypeCode 130 should exist maximum once</assert>

</rule>
<rule context="$ApplicableHeaderTradeDelivery ">
<assert test="$CII-SR-308" flag="warning" id="CII-SR-308">[CII-SR-308] - RelatedSupplyChainConsignment should not be present</assert>
Expand Down

0 comments on commit 9b2f4dd

Please sign in to comment.