Skip to content

Commit

Permalink
Add the fixes from upstream PR 333
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelte Jansen committed Nov 1, 2022
1 parent 468ccff commit 2738b49
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 58 deletions.
38 changes: 19 additions & 19 deletions schematron/nlcius-cii/CenPC434/CII/EN16931-CII-model.sch
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
<!-- Schematron binding rules generated by Andreas Pelekies -->
<!-- Data binding to CII syntax for EN16931 -->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron" is-a="EN16931" id="EN16931-CII-Model">
<param name="BR-01" value="normalize-space(rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID) != ''"/>
<param name="BR-02" value="normalize-space(rsm:ExchangedDocument/ram:ID) != ''"/>
<param name="BR-03" value="normalize-space(rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString[@format='102']) != ''"/>
<param name="BR-04" value="normalize-space(rsm:ExchangedDocument/ram:TypeCode) != ''"/>
<param name="BR-05" value="normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode) != ''"/>
<param name="BR-06" value="normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:Name) != ''"/>
<param name="BR-07" value="normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name) != ''"/>
<param name="BR-01" value="every $node in (rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID) satisfies (normalize-space($node) != '')"/>
<param name="BR-02" value="every $node in (rsm:ExchangedDocument/ram:ID) satisfies (normalize-space($node) != '')"/>
<param name="BR-03" value="every $node in (rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString[@format='102']) satisfies (normalize-space($node) != '')"/>
<param name="BR-04" value="every $node in (rsm:ExchangedDocument/ram:TypeCode) satisfies (normalize-space($node) != '')"/>
<param name="BR-05" value="every $node in (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode) satisfies (normalize-space($node) != '')"/>
<param name="BR-06" value="every $node in (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:Name) satisfies (normalize-space($node) != '')"/>
<param name="BR-07" value="every $node in (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name) satisfies (normalize-space($node) != '')"/>
<param name="BR-08" value="rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress"/>
<param name="BR-09" value="normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID) != ''"/>
<param name="BR-09" value="every $node in (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID) satisfies (normalize-space($node) != '')"/>
<param name="BR-10" value="rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress"/>
<param name="BR-11" value="normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID) != ''"/>
<param name="BR-11" value="every $node in (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID) satisfies (normalize-space($node) != '')"/>
<param name="BR-12" value="(ram:LineTotalAmount)"/>
<param name="BR-13" value="(ram:TaxBasisTotalAmount)"/>
<param name="BR-14" value="(ram:GrandTotalAmount)"/>
Expand All @@ -26,11 +26,11 @@
<param name="BR-18" value="(ram:Name)"/>
<param name="BR-19" value="(ram:PostalTradeAddress)"/>
<param name="BR-20" value="(ram:PostalTradeAddress/ram:CountryID)"/>
<param name="BR-21" value="normalize-space(ram:AssociatedDocumentLineDocument/ram:LineID) != ''"/>
<param name="BR-21" value="every $node in (ram:AssociatedDocumentLineDocument/ram:LineID) satisfies (normalize-space($node) != '')"/>
<param name="BR-22" value="(ram:SpecifiedLineTradeDelivery/ram:BilledQuantity)"/>
<param name="BR-23" value="(ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode)"/>
<param name="BR-24" value="(ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)"/>
<param name="BR-25" value="normalize-space(ram:SpecifiedTradeProduct/ram:Name) != ''"/>
<param name="BR-25" value="every $node in (ram:SpecifiedTradeProduct/ram:Name) satisfies (normalize-space($node) != '')"/>
<param name="BR-26" value="(ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount)"/>
<param name="BR-27" value="(ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount) &gt;= 0"/>
<param name="BR-28" value="(ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:ChargeAmount &gt;= 0) or not(ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:ChargeAmount)"/>
Expand All @@ -53,17 +53,17 @@
<param name="BR-49" value="(ram:TypeCode)"/>
<param name="BR-50" value="(ram:IBANID) or (ram:ProprietaryID)"/>
<param name="BR-51" value="string-length(ram:ID)&lt;=10"/>
<param name="BR-52" value="normalize-space(ram:IssuerAssignedID) != ''"/>
<param name="BR-52" value="every $node in (ram:IssuerAssignedID) satisfies (normalize-space($node) != '')"/>
<param name="BR-53" value="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode) or (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode and (ram:TaxTotalAmount/@currencyID = /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode) and not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode = /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode))"/>
<param name="BR-54" value="(ram:Description) and (ram:Value)"/>
<param name="BR-55" value="normalize-space(ram:IssuerAssignedID) != ''"/>
<param name="BR-56" value="normalize-space(ram:SpecifiedTaxRegistration/ram:ID[@schemeID='VA']) != ''"/>
<param name="BR-57" value="(ram:ShipToTradeParty/ram:PostalTradeAddress and normalize-space(ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID) != '') or not (ram:ShipToTradeParty/ram:PostalTradeAddress)"/>
<param name="BR-55" value="every $node in (ram:IssuerAssignedID) satisfies (normalize-space($node) != '')"/>
<param name="BR-56" value="every $node in (ram:SpecifiedTaxRegistration/ram:ID[@schemeID='VA']) satisfies (normalize-space($node) != '')"/>
<param name="BR-57" value="(ram:ShipToTradeParty/ram:PostalTradeAddress and (every $node in (ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID) satisfies (normalize-space($node) != ''))) or not (ram:ShipToTradeParty/ram:PostalTradeAddress)"/>
<param name="BR-61" value="(ram:IBANID) or (ram:ProprietaryID)"/>
<param name="BR-62" value="normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication/ram:URIID/@schemeID) != '' or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication)"/>
<param name="BR-63" value="normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication/ram:URIID/@schemeID) != '' or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication)"/>
<param name="BR-64" value="normalize-space(ram:SpecifiedTradeProduct/ram:GlobalID/@schemeID) != '' or not (ram:SpecifiedTradeProduct/ram:GlobalID)"/>
<param name="BR-65" value="normalize-space(ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode/@listID) != '' or not (ram:SpecifiedTradeProduct/ram:DesignatedProductClassification)"/>
<param name="BR-62" value="(every $node in (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication/ram:URIID/@schemeID) satisfies (normalize-space($node) != '')) or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication)"/>
<param name="BR-63" value="(every $node in (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication/ram:URIID/@schemeID) satisfies (normalize-space($node) != '')) or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication)"/>
<param name="BR-64" value="(every $node in (ram:SpecifiedTradeProduct/ram:GlobalID/@schemeID) satisfies (normalize-space($node) != '')) or not (ram:SpecifiedTradeProduct/ram:GlobalID)"/>
<param name="BR-65" value="(every $node in (ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode/@listID) satisfies (normalize-space($node) != '')) or not (ram:SpecifiedTradeProduct/ram:DesignatedProductClassification)"/>
<!--param name="BR-CO-02" value="((ram:TypeCode = ('30','57')) and (ram:PayeePartyCreditorFinancialAccount/ram:IBANID or ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID)) or not(ram:TypeCode = ('30','57'))"/-->
<param name="BR-CO-03" value="((//ram:TaxPointDate) and not(//ram:DueDateTypeCode)) or (not (//ram:TaxPointDate) and (//ram:DueDateTypeCode)) or (not (//ram:TaxPointDate) and not (//ram:DueDateTypeCode))"/>
<param name="BR-CO-04" value="(ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)"/>
Expand Down
Loading

0 comments on commit 2738b49

Please sign in to comment.