Skip to content

Commit

Permalink
added rule UBL-SR-51 to control the third line in an address. Closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
oriol committed Oct 4, 2022
1 parent 4bc0998 commit ba6fa29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ubl/schematron/UBL/EN16931-UBL-syntax.sch
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<param name="UBL-SR-48" value="count(cac:Item/cac:ClassifiedTaxCategory) = 1"/>
<param name="UBL-SR-49" value="(count(cac:InvoicePeriod/cbc:DescriptionCode) &lt;=1)"/>
<param name="UBL-SR-50" value="count(cac:Item/cbc:Description) &lt;= 1"/>
<param name="UBL-SR-51" value="count(cbc:Line) = 1"/>

<param name="UBL-DT-01" value="string-length(substring-after(.,'.'))&lt;=2"/>
<param name="UBL-DT-06" value="(@mimeCode)"/>
Expand Down Expand Up @@ -777,4 +778,5 @@
<param name="Code_data_type" value="//*[ends-with(name(), 'Code')]"/>
<param name="Binary_object_data_type" value="//*[ends-with(name(), 'BinaryObject')]"/>
<param name="Accounting_supplier_party" value="cac:AccountingSupplierParty/cac:Party"/>
<param name="AddressLine" value="//cac:AddressLine"/>
</pattern>
3 changes: 3 additions & 0 deletions ubl/schematron/abstract/EN16931-syntax.sch
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
-->
<!-- Abstract rules for syntax -->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron" abstract="true" id="syntax">
<rule context="$AddressLine">
<assert test="$UBL-SR-51" flag="fatal" id="UBL-SR-51">[UBL-SR-51]-An address can only have one third line.</assert>
</rule>
<rule context="$Accounting_supplier_party">
<assert test="$UBL-SR-42" flag="fatal" id="UBL-SR-42">[UBL-SR-42]-Party tax scheme shall occur maximum twice in accounting supplier party</assert>
</rule>
Expand Down

0 comments on commit ba6fa29

Please sign in to comment.