[Changes in New Schematron]

Please note that some of these changes are moves in the schematron. A move can be undertaken to make a rule work more efficiently or to correct improper functioning of the Rule due to context sensitive usage.

There have been 34 added elements with a total of 97 descendants

Added Patterns

  1. destinationparty::
    1. rule:: <sch:rule context="com:DestinationParty[/pie:Invoice or /pcm:Invoice]" >
    2. report:: <sch:report test="count(com:Address)>1" > There should only be one Address under DestinationParty </sch:report>
    3. report:: <sch:report test="count(com:Contact)>1" > There should only be one Contact under DestinationParty </sch:report>
    4. report:: <sch:report test="count(com:Language)>1" > There should only be one Language under DestinationParty </sch:report>
    5. report:: <sch:report test="count(com:PartyName)>1" > There should only be one PartyName under DestinationParty </sch:report>
    6. assert:: <sch:assert test=" com:Address/com:Country/com:code='AF' or com:Address/com:Country/com:code='AX' or com:Address/com:Country/com:code='AL' or com:Address/com:Country/com:code='DZ' or com:Address/com:Country/com:code='AS' or com:Address/com:Country/com:code='AD' or com:Address/com:Country/com:code='AO' or com:Address/com:Country/com:code='AI' or com:Address/com:Country/com:code='AQ' or com:Address/com:Country/com:code='AG' or com:Address/com:Country/com:code='AR' or com:Address/com:Country/com:code='AM' or com:Address/com:Country/com:code='AW' or com:Address/com:Country/com:code='AU' or com:Address/com:Country/com:code='AT' or com:Address/com:Country/com:code='AZ' or com:Address/com:Country/com:code='BS' or com:Address/com:Country/com:code='BH' or com:Address/com:Country/com:code='BD' or com:Address/com:Country/com:code='BB' or com:Address/com:Country/com:code='BY' or com:Address/com:Country/com:code='BE' or com:Address/com:Country/com:code='BZ' or com:Address/com:Country/com:code='BJ' or com:Address/com:Country/com:code='BM' or com:Address/com:Country/com:code='BT' or com:Address/com:Country/com:code='BO' or com:Address/com:Country/com:code='BA' or com:Address/com:Country/com:code='BW' or com:Address/com:Country/com:code='BV' or com:Address/com:Country/com:code='BR' or com:Address/com:Country/com:code='IO' or com:Address/com:Country/com:code='BN' or com:Address/com:Country/com:code='BG' or com:Address/com:Country/com:code='BF' or com:Address/com:Country/com:code='BI' or com:Address/com:Country/com:code='KH' or com:Address/com:Country/com:code='CM' or com:Address/com:Country/com:code='CA' or com:Address/com:Country/com:code='CV' or com:Address/com:Country/com:code='KY' or com:Address/com:Country/com:code='CF' or com:Address/com:Country/com:code='TD' or com:Address/com:Country/com:code='CL' or com:Address/com:Country/com:code='CN' or com:Address/com:Country/com:code='CX' or com:Address/com:Country/com:code='CC' or com:Address/com:Country/com:code='CO' or com:Address/com:Country/com:code='KM' or com:Address/com:Country/com:code='CG' or com:Address/com:Country/com:code='CD' or com:Address/com:Country/com:code='CK' or com:Address/com:Country/com:code='CR' or com:Address/com:Country/com:code='CI' or com:Address/com:Country/com:code='HR' or com:Address/com:Country/com:code='CU' or com:Address/com:Country/com:code='CY' or com:Address/com:Country/com:code='CZ' or com:Address/com:Country/com:code='DK' or com:Address/com:Country/com:code='DJ' or com:Address/com:Country/com:code='DM' or com:Address/com:Country/com:code='DO' or com:Address/com:Country/com:code='EC' or com:Address/com:Country/com:code='EG' or com:Address/com:Country/com:code='SV' or com:Address/com:Country/com:code='GQ' or com:Address/com:Country/com:code='ER' or com:Address/com:Country/com:code='EE' or com:Address/com:Country/com:code='ET' or com:Address/com:Country/com:code='FK' or com:Address/com:Country/com:code='FO' or com:Address/com:Country/com:code='FJ' or com:Address/com:Country/com:code='FI' or com:Address/com:Country/com:code='FR' or com:Address/com:Country/com:code='GF' or com:Address/com:Country/com:code='PF' or com:Address/com:Country/com:code='TF' or com:Address/com:Country/com:code='GA' or com:Address/com:Country/com:code='GM' or com:Address/com:Country/com:code='GE' or com:Address/com:Country/com:code='DE' or com:Address/com:Country/com:code='GH' or com:Address/com:Country/com:code='GI' or com:Address/com:Country/com:code='GR' or com:Address/com:Country/com:code='GL' or com:Address/com:Country/com:code='GD' or com:Address/com:Country/com:code='GP' or com:Address/com:Country/com:code='GU' or com:Address/com:Country/com:code='GT' or com:Address/com:Country/com:code='GG' or com:Address/com:Country/com:code='GN' or com:Address/com:Country/com:code='GW' or com:Address/com:Country/com:code='GY' or com:Address/com:Country/com:code='HT' or com:Address/com:Country/com:code='HM' or com:Address/com:Country/com:code='VA' or com:Address/com:Country/com:code='HN' or com:Address/com:Country/com:code='HK' or com:Address/com:Country/com:code='HU' or com:Address/com:Country/com:code='IS' or com:Address/com:Country/com:code='IN' or com:Address/com:Country/com:code='ID' or com:Address/com:Country/com:code='IR' or com:Address/com:Country/com:code='IQ' or com:Address/com:Country/com:code='IE' or com:Address/com:Country/com:code='IL' or com:Address/com:Country/com:code='IT' or com:Address/com:Country/com:code='JM' or com:Address/com:Country/com:code='JP' or com:Address/com:Country/com:code='JE' or com:Address/com:Country/com:code='JO' or com:Address/com:Country/com:code='KZ' or com:Address/com:Country/com:code='KE' or com:Address/com:Country/com:code='KI' or com:Address/com:Country/com:code='KP' or com:Address/com:Country/com:code='KR' or com:Address/com:Country/com:code='KW' or com:Address/com:Country/com:code='KG' or com:Address/com:Country/com:code='LA' or com:Address/com:Country/com:code='LV' or com:Address/com:Country/com:code='LB' or com:Address/com:Country/com:code='LS' or com:Address/com:Country/com:code='LR' or com:Address/com:Country/com:code='LY' or com:Address/com:Country/com:code='LI' or com:Address/com:Country/com:code='LT' or com:Address/com:Country/com:code='LU' or com:Address/com:Country/com:code='MO' or com:Address/com:Country/com:code='MK' or com:Address/com:Country/com:code='MG' or com:Address/com:Country/com:code='MW' or com:Address/com:Country/com:code='MY' or com:Address/com:Country/com:code='MV' or com:Address/com:Country/com:code='ML' or com:Address/com:Country/com:code='MT' or com:Address/com:Country/com:code='MH' or com:Address/com:Country/com:code='MQ' or com:Address/com:Country/com:code='MR' or com:Address/com:Country/com:code='MU' or com:Address/com:Country/com:code='YT' or com:Address/com:Country/com:code='MX' or com:Address/com:Country/com:code='FM' or com:Address/com:Country/com:code='MD' or com:Address/com:Country/com:code='MC' or com:Address/com:Country/com:code='MN' or com:Address/com:Country/com:code='MS' or com:Address/com:Country/com:code='MA' or com:Address/com:Country/com:code='MZ' or com:Address/com:Country/com:code='MM' or com:Address/com:Country/com:code='NA' or com:Address/com:Country/com:code='NR' or com:Address/com:Country/com:code='NP' or com:Address/com:Country/com:code='NL' or com:Address/com:Country/com:code='AN' or com:Address/com:Country/com:code='NC' or com:Address/com:Country/com:code='NZ' or com:Address/com:Country/com:code='NI' or com:Address/com:Country/com:code='NE' or com:Address/com:Country/com:code='NG' or com:Address/com:Country/com:code='NU' or com:Address/com:Country/com:code='NF' or com:Address/com:Country/com:code='MP' or com:Address/com:Country/com:code='NO' or com:Address/com:Country/com:code='OM' or com:Address/com:Country/com:code='PK' or com:Address/com:Country/com:code='PW' or com:Address/com:Country/com:code='PS' or com:Address/com:Country/com:code='PA' or com:Address/com:Country/com:code='PG' or com:Address/com:Country/com:code='PY' or com:Address/com:Country/com:code='PE' or com:Address/com:Country/com:code='PH' or com:Address/com:Country/com:code='PN' or com:Address/com:Country/com:code='PL' or com:Address/com:Country/com:code='PT' or com:Address/com:Country/com:code='PR' or com:Address/com:Country/com:code='QA' or com:Address/com:Country/com:code='RE' or com:Address/com:Country/com:code='RO' or com:Address/com:Country/com:code='RU' or com:Address/com:Country/com:code='RW' or com:Address/com:Country/com:code='SH' or com:Address/com:Country/com:code='KN' or com:Address/com:Country/com:code='LC' or com:Address/com:Country/com:code='PM' or com:Address/com:Country/com:code='VC' or com:Address/com:Country/com:code='WS' or com:Address/com:Country/com:code='SM' or com:Address/com:Country/com:code='ST' or com:Address/com:Country/com:code='SA' or com:Address/com:Country/com:code='SN' or com:Address/com:Country/com:code='CS' or com:Address/com:Country/com:code='SC' or com:Address/com:Country/com:code='SG' or com:Address/com:Country/com:code='SK' or com:Address/com:Country/com:code='SI' or com:Address/com:Country/com:code='SB' or com:Address/com:Country/com:code='SO' or com:Address/com:Country/com:code='ZA' or com:Address/com:Country/com:code='GS' or com:Address/com:Country/com:code='ES' or com:Address/com:Country/com:code='LK' or com:Address/com:Country/com:code='SD' or com:Address/com:Country/com:code='SR' or com:Address/com:Country/com:code='SJ' or com:Address/com:Country/com:code='SZ' or com:Address/com:Country/com:code='SE' or com:Address/com:Country/com:code='CH' or com:Address/com:Country/com:code='SY' or com:Address/com:Country/com:code='TW' or com:Address/com:Country/com:code='TJ' or com:Address/com:Country/com:code='TZ' or com:Address/com:Country/com:code='TH' or com:Address/com:Country/com:code='TL' or com:Address/com:Country/com:code='TG' or com:Address/com:Country/com:code='TK' or com:Address/com:Country/com:code='TO' or com:Address/com:Country/com:code='TT' or com:Address/com:Country/com:code='TN' or com:Address/com:Country/com:code='TR' or com:Address/com:Country/com:code='TM' or com:Address/com:Country/com:code='TC' or com:Address/com:Country/com:code='TV' or com:Address/com:Country/com:code='UG' or com:Address/com:Country/com:code='UA' or com:Address/com:Country/com:code='AE' or com:Address/com:Country/com:code='GB' or com:Address/com:Country/com:code='US' or com:Address/com:Country/com:code='UM' or com:Address/com:Country/com:code='UY' or com:Address/com:Country/com:code='UZ' or com:Address/com:Country/com:code='VU' or com:Address/com:Country/com:code='VE' or com:Address/com:Country/com:code='VN' or com:Address/com:Country/com:code='VG' or com:Address/com:Country/com:code='VI' or com:Address/com:Country/com:code='WF' or com:Address/com:Country/com:code='EH' or com:Address/com:Country/com:code='YE' or com:Address/com:Country/com:code='ZM' or com:Address/com:Country/com:code='ZW'" > com:Address/com:Country/com:Code should be 2 alpha-numerical characters e.g. ”DK” for Denmark </sch:assert>
    7. </sch:rule>
  2. buyercontact::
    1. rule:: <sch:rule context="com:BuyerContact[/pie:Invoice or /pcm:Invoice][com:Role]" >
    2. assert:: <sch:assert test="com:Role[.='Indkøbsansvarlig' or .='BogHolder' or .='Budgetansvarlig' or .='Rekvirent']" > BuyerContact Role. Must be either 'Indkøbsansvarlig', 'Bogholder','Budgetansvarlig', or 'Rekvirent' </sch:assert>
    3. </sch:rule>
  3. ReferencedOrder[/pie:Invoice or /pcm:Invoice]::
    1. rule:: <sch:rule context="com:ReferencedOrder" >
    2. assert:: <sch:assert test="string-length(com:BuyersOrderID)>0" > BuyersOrderID under ReferencedOrder should hold content. </sch:assert>
    3. </sch:rule>
  4. referencedorderlineItemTax::
    1. rule:: <sch:rule context="com:InvoiceLine/com:ReferencedOrderLine/com:Item[/pie:Invoice or /pcm:Invoice]" >
    2. assert:: <sch:assert test="count(com:Tax)<2" > There should only be one Item - Tax per ReferencedOrderLine. </sch:assert>
    3. </sch:rule>
  5. deliverySchedule::
    1. rule:: <sch:rule context="com:DeliverySchedule[/pie:Invoice or /pcm:Invoice]" >
    2. report:: <sch:report test="com:ID > 4" > DeliverySchedule ID should be either 1,2,3, or 4 </sch:report>
    3. report:: <sch:report test="com:ID < 1" > DeliverySchedule ID should be either 1,2,3, or 4 </sch:report>
    4. assert:: <sch:assert test="com:RequestedDeliveryDateTime" > RequestedDeliveryDateTime element is missing in the DeliverySchedule element </sch:assert>
    5. </sch:rule>
  6. tobepaidtotalamount::
    1. rule:: <sch:rule context="com:ToBePaidTotalAmount[/pie:Invoice or /pcm:Invoice]" >
    2. assert:: <sch:assert test="not(starts-with(.,'-'))" > com:ToBePaidTotalAmount should be positive, if your document is a faktura with a negative amount represent the document as a kreditnota. </sch:assert>
    3. </sch:rule>
  7. PayeeNote_PayerNote::
    1. rule:: <sch:rule context="com:PayeeNote[/pie:Invoice or /pcm:Invoice] | com:PayerNote[/pie:Invoice or /pcm:Invoice]" >
    2. assert:: <sch:assert test="string-length(.)<21" >
    3. name:: <sch:name > </sch:name>
    4. may not be longer than 20 characters </sch:assert> </sch:rule>
  8. invoiceline::
    1. rule:: <sch:rule context="com:InvoiceLine/com:Item[/pie:Invoice or /pcm:Invoice]" >
    2. assert:: <sch:assert test="string-length(com:Description)>0" > Description under InvoiceLine Item should be greater than 0 in length </sch:assert>
    3. assert:: <sch:assert test="string-length(com:ID)>0" > WARNING: ID under InvoiceLine Item should be greater than 0 in length </sch:assert>
    4. report:: <sch:report test="count(com:Tax)>1" > There should only be one Tax element under item. </sch:report>
    5. </sch:rule>
  9. PenaltySurchargeRateNumeric::
    1. rule:: <sch:rule context="com:PenaltySurchargeRateNumeric[/pie:Invoice or /pcm:Invoice] | com:SettlementDiscountRateNumeric[/pie:Invoice or /pcm:Invoice]" >
    2. report:: <sch:report test="(number(.)<0) or (number(.)>1000)" >
    3. name:: <name > </name>
    4. should be a value of 0 to 1000. 0 is considered in this context to include multiple zeros, 00 is still 0. </sch:report> </sch:rule>
  10. LongAdvice::
    1. rule:: <sch:rule context="com:LongAdvice[/pie:Invoice or /pcm:Invoice]" >
    2. assert:: <sch:assert test="string-length(.)>1475" > Long Advice should not be more than 40 lines, 35 characters per line - 1475 characters in all. </sch:assert>
    3. </sch:rule>
  11. RatePercentNumeric::
    1. rule:: <sch:rule context="com:RatePercentNumeric[/pie:Invoice or /pcm:Invoice]" >
    2. assert:: <sch:assert test="(number(.) = '0') or (.='25')" > RatePercentNumeric should equal 0 or 25. 0 is considered in this context to include multiple zeros, 00 is still 0. </sch:assert>
    3. </sch:rule>

Added Rules

  1. /pie:Invoice | pcm:Invoice::
    1. assert:: <sch:assert test="substring-before(translate(substring-after(namespace-uri(),'http://rep.oio.dk/ubl/xml/schemas/0p71/'),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'),'/') = com:TypeCode" > The value of com:TypeCode under Invoice should be an uppercased equivalent to the lowercase value at the end of the namespace of the document element, thus if the namespace is http://rep.oio.dk/ubl/xml/schemas/0p71/pie the value of com:TypeCode should be PIE. </sch:assert>
    2. assert:: <sch:assert test="main:InvoiceCurrencyCode = "AED" or main:InvoiceCurrencyCode = "AFN" or main:InvoiceCurrencyCode = "ALL" or main:InvoiceCurrencyCode = "AMD" or main:InvoiceCurrencyCode = "ANG" or main:InvoiceCurrencyCode = "AOA" or main:InvoiceCurrencyCode = "ARS" or main:InvoiceCurrencyCode = "AUD" or main:InvoiceCurrencyCode = "AWG" or main:InvoiceCurrencyCode = "AZM" or main:InvoiceCurrencyCode = "AZN" or main:InvoiceCurrencyCode = "BAM" or main:InvoiceCurrencyCode = "BBD" or main:InvoiceCurrencyCode = "BDT" or main:InvoiceCurrencyCode = "BGN" or main:InvoiceCurrencyCode = "BHD" or main:InvoiceCurrencyCode = "BIF" or main:InvoiceCurrencyCode = "BMD" or main:InvoiceCurrencyCode = "BND" or main:InvoiceCurrencyCode = "BOB" or main:InvoiceCurrencyCode = "BRL" or main:InvoiceCurrencyCode = "BSD" or main:InvoiceCurrencyCode = "BTN" or main:InvoiceCurrencyCode = "BWP" or main:InvoiceCurrencyCode = "BYR" or main:InvoiceCurrencyCode = "BZD" or main:InvoiceCurrencyCode = "CAD" or main:InvoiceCurrencyCode = "CDF" or main:InvoiceCurrencyCode = "CHF" or main:InvoiceCurrencyCode = "CLP" or main:InvoiceCurrencyCode = "CNY" or main:InvoiceCurrencyCode = "COP" or main:InvoiceCurrencyCode = "CRC" or main:InvoiceCurrencyCode = "CSD" or main:InvoiceCurrencyCode = "CUP" or main:InvoiceCurrencyCode = "CVE" or main:InvoiceCurrencyCode = "CYP" or main:InvoiceCurrencyCode = "CZK" or main:InvoiceCurrencyCode = "DJF" or main:InvoiceCurrencyCode = "DKK" or main:InvoiceCurrencyCode = "DOP" or main:InvoiceCurrencyCode = "DZD" or main:InvoiceCurrencyCode = "EEK" or main:InvoiceCurrencyCode = "EGP" or main:InvoiceCurrencyCode = "ERN" or main:InvoiceCurrencyCode = "ETB" or main:InvoiceCurrencyCode = "EUR" or main:InvoiceCurrencyCode = "FJD" or main:InvoiceCurrencyCode = "FKP" or main:InvoiceCurrencyCode = "GBP" or main:InvoiceCurrencyCode = "GEL" or main:InvoiceCurrencyCode = "GGP" or main:InvoiceCurrencyCode = "GHC" or main:InvoiceCurrencyCode = "GIP" or main:InvoiceCurrencyCode = "GMD" or main:InvoiceCurrencyCode = "GNF" or main:InvoiceCurrencyCode = "GTQ" or main:InvoiceCurrencyCode = "GYD" or main:InvoiceCurrencyCode = "HKD" or main:InvoiceCurrencyCode = "HNL" or main:InvoiceCurrencyCode = "HRK" or main:InvoiceCurrencyCode = "HTG" or main:InvoiceCurrencyCode = "HUF" or main:InvoiceCurrencyCode = "IDR" or main:InvoiceCurrencyCode = "ILS" or main:InvoiceCurrencyCode = "IMP" or main:InvoiceCurrencyCode = "INR" or main:InvoiceCurrencyCode = "IQD" or main:InvoiceCurrencyCode = "IRR" or main:InvoiceCurrencyCode = "ISK" or main:InvoiceCurrencyCode = "JEP" or main:InvoiceCurrencyCode = "JMD" or main:InvoiceCurrencyCode = "JOD" or main:InvoiceCurrencyCode = "JPY" or main:InvoiceCurrencyCode = "KES" or main:InvoiceCurrencyCode = "KGS" or main:InvoiceCurrencyCode = "KHR" or main:InvoiceCurrencyCode = "KMF" or main:InvoiceCurrencyCode = "KPW" or main:InvoiceCurrencyCode = "KRW" or main:InvoiceCurrencyCode = "KWD" or main:InvoiceCurrencyCode = "KYD" or main:InvoiceCurrencyCode = "KZT" or main:InvoiceCurrencyCode = "LAK" or main:InvoiceCurrencyCode = "LBP" or main:InvoiceCurrencyCode = "LKR" or main:InvoiceCurrencyCode = "LRD" or main:InvoiceCurrencyCode = "LSL" or main:InvoiceCurrencyCode = "LTL" or main:InvoiceCurrencyCode = "LVL" or main:InvoiceCurrencyCode = "LYD" or main:InvoiceCurrencyCode = "MAD" or main:InvoiceCurrencyCode = "MDL" or main:InvoiceCurrencyCode = "MGA" or main:InvoiceCurrencyCode = "MKD" or main:InvoiceCurrencyCode = "MMK" or main:InvoiceCurrencyCode = "MNT" or main:InvoiceCurrencyCode = "MOP" or main:InvoiceCurrencyCode = "MRO" or main:InvoiceCurrencyCode = "MTL" or main:InvoiceCurrencyCode = "MUR" or main:InvoiceCurrencyCode = "MVR" or main:InvoiceCurrencyCode = "MWK" or main:InvoiceCurrencyCode = "MXN" or main:InvoiceCurrencyCode = "MYR" or main:InvoiceCurrencyCode = "MZM" or main:InvoiceCurrencyCode = "NAD" or main:InvoiceCurrencyCode = "NGN" or main:InvoiceCurrencyCode = "NIO" or main:InvoiceCurrencyCode = "NOK" or main:InvoiceCurrencyCode = "NPR" or main:InvoiceCurrencyCode = "NZD" or main:InvoiceCurrencyCode = "OMR" or main:InvoiceCurrencyCode = "PAB" or main:InvoiceCurrencyCode = "PEN" or main:InvoiceCurrencyCode = "PGK" or main:InvoiceCurrencyCode = "PHP" or main:InvoiceCurrencyCode = "PKR" or main:InvoiceCurrencyCode = "PLN" or main:InvoiceCurrencyCode = "PYG" or main:InvoiceCurrencyCode = "QAR" or main:InvoiceCurrencyCode = "ROL" or main:InvoiceCurrencyCode = "RON" or main:InvoiceCurrencyCode = "RUB" or main:InvoiceCurrencyCode = "RWF" or main:InvoiceCurrencyCode = "SAR" or main:InvoiceCurrencyCode = "SBD" or main:InvoiceCurrencyCode = "SCR" or main:InvoiceCurrencyCode = "SDD" or main:InvoiceCurrencyCode = "SEK" or main:InvoiceCurrencyCode = "SGD" or main:InvoiceCurrencyCode = "SHP" or main:InvoiceCurrencyCode = "SIT" or main:InvoiceCurrencyCode = "SKK" or main:InvoiceCurrencyCode = "SLL" or main:InvoiceCurrencyCode = "SOS" or main:InvoiceCurrencyCode = "SPL" or main:InvoiceCurrencyCode = "SRD" or main:InvoiceCurrencyCode = "STD" or main:InvoiceCurrencyCode = "SVC" or main:InvoiceCurrencyCode = "SYP" or main:InvoiceCurrencyCode = "SZL" or main:InvoiceCurrencyCode = "THB" or main:InvoiceCurrencyCode = "TJS" or main:InvoiceCurrencyCode = "TMM" or main:InvoiceCurrencyCode = "TND" or main:InvoiceCurrencyCode = "TOP" or main:InvoiceCurrencyCode = "TRY" or main:InvoiceCurrencyCode = "TTD" or main:InvoiceCurrencyCode = "TVD" or main:InvoiceCurrencyCode = "TWD" or main:InvoiceCurrencyCode = "TZS" or main:InvoiceCurrencyCode = "UAH" or main:InvoiceCurrencyCode = "UGX" or main:InvoiceCurrencyCode = "USD" or main:InvoiceCurrencyCode = "UYU" or main:InvoiceCurrencyCode = "UZS" or main:InvoiceCurrencyCode = "VEB" or main:InvoiceCurrencyCode = "VND" or main:InvoiceCurrencyCode = "VUV" or main:InvoiceCurrencyCode = "WST" or main:InvoiceCurrencyCode = "XAF" or main:InvoiceCurrencyCode = "XAG" or main:InvoiceCurrencyCode = "XAU" or main:InvoiceCurrencyCode = "XCD" or main:InvoiceCurrencyCode = "XDR" or main:InvoiceCurrencyCode = "XOF" or main:InvoiceCurrencyCode = "XPD" or main:InvoiceCurrencyCode = "XPF" or main:InvoiceCurrencyCode = "XPT" or main:InvoiceCurrencyCode = "YER" or main:InvoiceCurrencyCode = "ZAR" or main:InvoiceCurrencyCode = "ZMK" or main:InvoiceCurrencyCode = "ZWD" " > main:InvoiceCurrencyCode should be uppercase </sch:assert>
    3. assert:: <sch:assert test="com:InvoiceLine" > There must be an InvoiceLine </sch:assert>
    4. report:: <sch:report test="(contains(namespace-uri(),'pip/') or contains(namespace-uri(),'pcp/')) and not(main:EncodedDocument)" > In Pip or PCP documents EncodedDocument must be present. </sch:report>
    5. assert:: <sch:assert test="com:BuyerParty" > There must be a BuyerParty must exist </sch:assert>
    6. assert:: <sch:assert test="com:SellerParty" > There must be a SellerParty must exist </sch:assert>
    7. report:: <sch:report test="com:BuyerParty[string-length(com:Address/com:HouseNumber) < 1] | com:SellerParty[string-length(com:Address/com:HouseNumber) < 1]" > WARNING: It is a bad practice not to have HouseNumber filled out, although it is not a refuseable error. </sch:report>
    8. assert:: <sch:assert test="(count(com:TaxTotal)<3) and (count(com:TaxTotal)>0)" > TaxTotal should occur between 1-2 times. </sch:assert>
  2. /pip:Invoice | /pcp:Invoice::
    1. assert:: <sch:assert test="string-length(com:IssueDate) > 0 " > IssueDate under Invoice must have content </sch:assert>
    2. assert:: <sch:assert test="string-length(com:ID) > 0 " > ID under Invoice must have content </sch:assert>
    3. assert:: <sch:assert test="string-length(main:EncodedDocument) > 0 " > EncodedDocument under Invoice must have content </sch:assert>
    4. assert:: <sch:assert test="string-length(com:ReferencedOrder/com:BuyerContact/com:BuyersOrderID) > 0 " > com:ReferencedOrder/com:BuyerContact/com:BuyersOrderID under Invoice must have content </sch:assert>
    5. assert:: <sch:assert test="string-length(com:BuyerParty/com:BuyerContact/com:ID) > 0 " > com:BuyerParty/com:BuyerContact/com:ID under Invoice must have content </sch:assert>
    6. assert:: <sch:assert test="string-length(com:SellerParty/com:ID) > 0 " > SellerParty/ID under Invoice must have content </sch:assert>
    7. assert:: <sch:assert test="string-length(com:SellerParty/com:PartyTaxScheme/com:CompanyTaxID) > 0 " > com:SellerParty/com:PartyTaxScheme/com:CompanyTaxID under Invoice must have content </sch:assert>
    8. assert:: <sch:assert test="string-length(com:PaymentMeans/com:TypeCodeID) > 0 " > com:PaymentMeans/com:TypeCodeID under Invoice must have content </sch:assert>
    9. assert:: <sch:assert test="string-length(com:PaymentMeans/com:PaymentDueDate) > 0 " > com:PaymentMeans/com:PaymentDueDate under Invoice must have content </sch:assert>
  3. com:BuyerParty[com:Address/com:ID='Juridisk'][/pie:Invoice or /pcm:Invoice]::
    1. report:: <sch:report test="preceding-sibling::com:BuyerParty[com:Address/com:ID != 'Fakturering'] | following-sibling::com:BuyerParty[com:Address/com:ID != 'Fakturering']" > BuyerParty com:Address com:ID should have a value of Juridisk or Fakturering, and there should only be one BuyerParty of each type </sch:report>
    2. report:: <sch:report test="count(com:Address) >1" > There should only be one Address under BuyerParty, this validation rule is implementable in XML Schema but is not provided as yet. </sch:report>
    3. assert:: <sch:assert test="string-length(com:ID)>0" > WARNING: there should be some value in ID under BuyerParty </sch:assert>
    4. assert:: <sch:assert test="count(com:PartyName) < 2" > A BuyerParty should have a single PartyName </sch:assert>
    5. assert:: <sch:assert test="com:Address/com:CityName" > There must be an Address.CityName in BuyerParty </sch:assert>
    6. assert:: <sch:assert test="com:Address/com:Street" > There must be an Address.Street in BuyerParty </sch:assert>
    7. assert:: <sch:assert test="com:Address/com:PostalZone" > There must be an Address.Street in BuyerParty </sch:assert>
    8. assert:: <sch:assert test="com:Address/com:Country/com:Code" > There must be an Address.Country.Code in BuyerParty </sch:assert>
    9. assert:: <sch:assert test="string-length(com:ID)>0" > WARNING: ID in BuyerParty should have content </sch:assert>
    10. assert:: <sch:assert test="string-length(com:BuyerContact/com:ID) > 0" > ID under BuyerContact must have a value, if you don't have an ID put in the value n/a. </sch:assert>
    11. assert:: <sch:assert test=" com:Address/com:Country/com:code='AF' or com:Address/com:Country/com:code='AX' or com:Address/com:Country/com:code='AL' or com:Address/com:Country/com:code='DZ' or com:Address/com:Country/com:code='AS' or com:Address/com:Country/com:code='AD' or com:Address/com:Country/com:code='AO' or com:Address/com:Country/com:code='AI' or com:Address/com:Country/com:code='AQ' or com:Address/com:Country/com:code='AG' or com:Address/com:Country/com:code='AR' or com:Address/com:Country/com:code='AM' or com:Address/com:Country/com:code='AW' or com:Address/com:Country/com:code='AU' or com:Address/com:Country/com:code='AT' or com:Address/com:Country/com:code='AZ' or com:Address/com:Country/com:code='BS' or com:Address/com:Country/com:code='BH' or com:Address/com:Country/com:code='BD' or com:Address/com:Country/com:code='BB' or com:Address/com:Country/com:code='BY' or com:Address/com:Country/com:code='BE' or com:Address/com:Country/com:code='BZ' or com:Address/com:Country/com:code='BJ' or com:Address/com:Country/com:code='BM' or com:Address/com:Country/com:code='BT' or com:Address/com:Country/com:code='BO' or com:Address/com:Country/com:code='BA' or com:Address/com:Country/com:code='BW' or com:Address/com:Country/com:code='BV' or com:Address/com:Country/com:code='BR' or com:Address/com:Country/com:code='IO' or com:Address/com:Country/com:code='BN' or com:Address/com:Country/com:code='BG' or com:Address/com:Country/com:code='BF' or com:Address/com:Country/com:code='BI' or com:Address/com:Country/com:code='KH' or com:Address/com:Country/com:code='CM' or com:Address/com:Country/com:code='CA' or com:Address/com:Country/com:code='CV' or com:Address/com:Country/com:code='KY' or com:Address/com:Country/com:code='CF' or com:Address/com:Country/com:code='TD' or com:Address/com:Country/com:code='CL' or com:Address/com:Country/com:code='CN' or com:Address/com:Country/com:code='CX' or com:Address/com:Country/com:code='CC' or com:Address/com:Country/com:code='CO' or com:Address/com:Country/com:code='KM' or com:Address/com:Country/com:code='CG' or com:Address/com:Country/com:code='CD' or com:Address/com:Country/com:code='CK' or com:Address/com:Country/com:code='CR' or com:Address/com:Country/com:code='CI' or com:Address/com:Country/com:code='HR' or com:Address/com:Country/com:code='CU' or com:Address/com:Country/com:code='CY' or com:Address/com:Country/com:code='CZ' or com:Address/com:Country/com:code='DK' or com:Address/com:Country/com:code='DJ' or com:Address/com:Country/com:code='DM' or com:Address/com:Country/com:code='DO' or com:Address/com:Country/com:code='EC' or com:Address/com:Country/com:code='EG' or com:Address/com:Country/com:code='SV' or com:Address/com:Country/com:code='GQ' or com:Address/com:Country/com:code='ER' or com:Address/com:Country/com:code='EE' or com:Address/com:Country/com:code='ET' or com:Address/com:Country/com:code='FK' or com:Address/com:Country/com:code='FO' or com:Address/com:Country/com:code='FJ' or com:Address/com:Country/com:code='FI' or com:Address/com:Country/com:code='FR' or com:Address/com:Country/com:code='GF' or com:Address/com:Country/com:code='PF' or com:Address/com:Country/com:code='TF' or com:Address/com:Country/com:code='GA' or com:Address/com:Country/com:code='GM' or com:Address/com:Country/com:code='GE' or com:Address/com:Country/com:code='DE' or com:Address/com:Country/com:code='GH' or com:Address/com:Country/com:code='GI' or com:Address/com:Country/com:code='GR' or com:Address/com:Country/com:code='GL' or com:Address/com:Country/com:code='GD' or com:Address/com:Country/com:code='GP' or com:Address/com:Country/com:code='GU' or com:Address/com:Country/com:code='GT' or com:Address/com:Country/com:code='GG' or com:Address/com:Country/com:code='GN' or com:Address/com:Country/com:code='GW' or com:Address/com:Country/com:code='GY' or com:Address/com:Country/com:code='HT' or com:Address/com:Country/com:code='HM' or com:Address/com:Country/com:code='VA' or com:Address/com:Country/com:code='HN' or com:Address/com:Country/com:code='HK' or com:Address/com:Country/com:code='HU' or com:Address/com:Country/com:code='IS' or com:Address/com:Country/com:code='IN' or com:Address/com:Country/com:code='ID' or com:Address/com:Country/com:code='IR' or com:Address/com:Country/com:code='IQ' or com:Address/com:Country/com:code='IE' or com:Address/com:Country/com:code='IL' or com:Address/com:Country/com:code='IT' or com:Address/com:Country/com:code='JM' or com:Address/com:Country/com:code='JP' or com:Address/com:Country/com:code='JE' or com:Address/com:Country/com:code='JO' or com:Address/com:Country/com:code='KZ' or com:Address/com:Country/com:code='KE' or com:Address/com:Country/com:code='KI' or com:Address/com:Country/com:code='KP' or com:Address/com:Country/com:code='KR' or com:Address/com:Country/com:code='KW' or com:Address/com:Country/com:code='KG' or com:Address/com:Country/com:code='LA' or com:Address/com:Country/com:code='LV' or com:Address/com:Country/com:code='LB' or com:Address/com:Country/com:code='LS' or com:Address/com:Country/com:code='LR' or com:Address/com:Country/com:code='LY' or com:Address/com:Country/com:code='LI' or com:Address/com:Country/com:code='LT' or com:Address/com:Country/com:code='LU' or com:Address/com:Country/com:code='MO' or com:Address/com:Country/com:code='MK' or com:Address/com:Country/com:code='MG' or com:Address/com:Country/com:code='MW' or com:Address/com:Country/com:code='MY' or com:Address/com:Country/com:code='MV' or com:Address/com:Country/com:code='ML' or com:Address/com:Country/com:code='MT' or com:Address/com:Country/com:code='MH' or com:Address/com:Country/com:code='MQ' or com:Address/com:Country/com:code='MR' or com:Address/com:Country/com:code='MU' or com:Address/com:Country/com:code='YT' or com:Address/com:Country/com:code='MX' or com:Address/com:Country/com:code='FM' or com:Address/com:Country/com:code='MD' or com:Address/com:Country/com:code='MC' or com:Address/com:Country/com:code='MN' or com:Address/com:Country/com:code='MS' or com:Address/com:Country/com:code='MA' or com:Address/com:Country/com:code='MZ' or com:Address/com:Country/com:code='MM' or com:Address/com:Country/com:code='NA' or com:Address/com:Country/com:code='NR' or com:Address/com:Country/com:code='NP' or com:Address/com:Country/com:code='NL' or com:Address/com:Country/com:code='AN' or com:Address/com:Country/com:code='NC' or com:Address/com:Country/com:code='NZ' or com:Address/com:Country/com:code='NI' or com:Address/com:Country/com:code='NE' or com:Address/com:Country/com:code='NG' or com:Address/com:Country/com:code='NU' or com:Address/com:Country/com:code='NF' or com:Address/com:Country/com:code='MP' or com:Address/com:Country/com:code='NO' or com:Address/com:Country/com:code='OM' or com:Address/com:Country/com:code='PK' or com:Address/com:Country/com:code='PW' or com:Address/com:Country/com:code='PS' or com:Address/com:Country/com:code='PA' or com:Address/com:Country/com:code='PG' or com:Address/com:Country/com:code='PY' or com:Address/com:Country/com:code='PE' or com:Address/com:Country/com:code='PH' or com:Address/com:Country/com:code='PN' or com:Address/com:Country/com:code='PL' or com:Address/com:Country/com:code='PT' or com:Address/com:Country/com:code='PR' or com:Address/com:Country/com:code='QA' or com:Address/com:Country/com:code='RE' or com:Address/com:Country/com:code='RO' or com:Address/com:Country/com:code='RU' or com:Address/com:Country/com:code='RW' or com:Address/com:Country/com:code='SH' or com:Address/com:Country/com:code='KN' or com:Address/com:Country/com:code='LC' or com:Address/com:Country/com:code='PM' or com:Address/com:Country/com:code='VC' or com:Address/com:Country/com:code='WS' or com:Address/com:Country/com:code='SM' or com:Address/com:Country/com:code='ST' or com:Address/com:Country/com:code='SA' or com:Address/com:Country/com:code='SN' or com:Address/com:Country/com:code='CS' or com:Address/com:Country/com:code='SC' or com:Address/com:Country/com:code='SG' or com:Address/com:Country/com:code='SK' or com:Address/com:Country/com:code='SI' or com:Address/com:Country/com:code='SB' or com:Address/com:Country/com:code='SO' or com:Address/com:Country/com:code='ZA' or com:Address/com:Country/com:code='GS' or com:Address/com:Country/com:code='ES' or com:Address/com:Country/com:code='LK' or com:Address/com:Country/com:code='SD' or com:Address/com:Country/com:code='SR' or com:Address/com:Country/com:code='SJ' or com:Address/com:Country/com:code='SZ' or com:Address/com:Country/com:code='SE' or com:Address/com:Country/com:code='CH' or com:Address/com:Country/com:code='SY' or com:Address/com:Country/com:code='TW' or com:Address/com:Country/com:code='TJ' or com:Address/com:Country/com:code='TZ' or com:Address/com:Country/com:code='TH' or com:Address/com:Country/com:code='TL' or com:Address/com:Country/com:code='TG' or com:Address/com:Country/com:code='TK' or com:Address/com:Country/com:code='TO' or com:Address/com:Country/com:code='TT' or com:Address/com:Country/com:code='TN' or com:Address/com:Country/com:code='TR' or com:Address/com:Country/com:code='TM' or com:Address/com:Country/com:code='TC' or com:Address/com:Country/com:code='TV' or com:Address/com:Country/com:code='UG' or com:Address/com:Country/com:code='UA' or com:Address/com:Country/com:code='AE' or com:Address/com:Country/com:code='GB' or com:Address/com:Country/com:code='US' or com:Address/com:Country/com:code='UM' or com:Address/com:Country/com:code='UY' or com:Address/com:Country/com:code='UZ' or com:Address/com:Country/com:code='VU' or com:Address/com:Country/com:code='VE' or com:Address/com:Country/com:code='VN' or com:Address/com:Country/com:code='VG' or com:Address/com:Country/com:code='VI' or com:Address/com:Country/com:code='WF' or com:Address/com:Country/com:code='EH' or com:Address/com:Country/com:code='YE' or com:Address/com:Country/com:code='ZM' or com:Address/com:Country/com:code='ZW'" > com:Address/com:Country/com:Code should be 2 alpha-numerical characters e.g. ”DK” for Denmark </sch:assert>
  4. com:SellerParty[com:Address/com:ID='Vareafsendelse'][/pie:Invoice or /pcm:Invoice]::
    1. report:: <sch:report test="preceding-sibling::com:SellerParty[com:ID != 'Betaling'] | following-sibling::com:SellerParty[com:ID != 'Betaling']" > SellerParty com:Address com:ID should have a value of Vareafsendelse or Betaling, and there should only be one SellerParty of each type </sch:report>
    2. assert:: <sch:assert test="com:Address/com:CityName" > There must be an Address.CityName in SellerParty </sch:assert>
    3. assert:: <sch:assert test="com:Address/com:Country/com:Code" > There must be an Address.Country.Code in SellerParty </sch:assert>
    4. assert:: <sch:assert test="string-length(com:ID)>0" > WARNING: ID in SellerParty should have content </sch:assert>
    5. assert:: <sch:assert test="string-length(com:ID) > 0" > The ID of the faktura should contain a value </sch:assert>
    6. assert:: <sch:assert test="count(PartyName)<2" > There must be a SellerParty and it must have no more than one partyname. </sch:assert>
  5. com:SellerParty[com:Address/com:ID='Betaling'][/pie:Invoice or /pcm:Invoice]::
    1. report:: <sch:report test="preceding-sibling::com:SellerParty[com:ID != 'Vareafsendelse'] | following-sibling::com:SellerParty[com:ID != 'Vareafsendelse']" > SellerParty com:Address com:ID should have a value of Vareafsendelse or Betaling, and there should only be one SellerParty of each type </sch:report>
    2. assert:: <sch:assert test="com:Address/com:CityName" > There must be an Address.CityName in SellerParty </sch:assert>
    3. assert:: <sch:assert test="com:Address/com:Country/com:Code" > There must be an Address.Country.Code in SellerParty </sch:assert>
    4. assert:: <sch:assert test="string-length(com:ID)>0" > WARNING: ID in SellerParty should have content </sch:assert>
    5. assert:: <sch:assert test="string-length(com:ID) > 0" > The ID of the faktura should contain a value </sch:assert>
    6. assert:: <sch:assert test="count(PartyName)<2" > There must be a SellerParty and it must have no more than one partyname. </sch:assert>
  6. com:SellerParty[com:Address/com:ID !='Vareafsendelse'][com:Address/com:ID !='Betaling'][/pie:Invoice or /pcm:Invoice]::
    1. assert:: <sch:assert test="com:Address/com:ID ='Vareafsendelse' or com:Address/com:ID ='Betaling'" > SellerParty com:Address com:ID should have a value of Vareafsendelse or Betaling, and there should only be one SellerParty of each type </sch:assert>
    2. assert:: <sch:assert test="com:Address/com:CityName" > There must be an Address.CityName in SellerParty </sch:assert>
    3. assert:: <sch:assert test="com:Address/com:Country/com:Code" > There must be an Address.Country.Code in SellerParty </sch:assert>
    4. assert:: <sch:assert test="string-length(com:ID)>0" > WARNING: ID in SellerParty should have content </sch:assert>
    5. assert:: <sch:assert test="string-length(com:ID) > 0" > The ID of the faktura should contain a value </sch:assert>
    6. assert:: <sch:assert test="count(PartyName)<2" > There must be a SellerParty and it must have no more than one partyname. </sch:assert>
    7. assert:: <sch:assert test=" com:Address/com:Country/com:code='AF' or com:Address/com:Country/com:code='AX' or com:Address/com:Country/com:code='AL' or com:Address/com:Country/com:code='DZ' or com:Address/com:Country/com:code='AS' or com:Address/com:Country/com:code='AD' or com:Address/com:Country/com:code='AO' or com:Address/com:Country/com:code='AI' or com:Address/com:Country/com:code='AQ' or com:Address/com:Country/com:code='AG' or com:Address/com:Country/com:code='AR' or com:Address/com:Country/com:code='AM' or com:Address/com:Country/com:code='AW' or com:Address/com:Country/com:code='AU' or com:Address/com:Country/com:code='AT' or com:Address/com:Country/com:code='AZ' or com:Address/com:Country/com:code='BS' or com:Address/com:Country/com:code='BH' or com:Address/com:Country/com:code='BD' or com:Address/com:Country/com:code='BB' or com:Address/com:Country/com:code='BY' or com:Address/com:Country/com:code='BE' or com:Address/com:Country/com:code='BZ' or com:Address/com:Country/com:code='BJ' or com:Address/com:Country/com:code='BM' or com:Address/com:Country/com:code='BT' or com:Address/com:Country/com:code='BO' or com:Address/com:Country/com:code='BA' or com:Address/com:Country/com:code='BW' or com:Address/com:Country/com:code='BV' or com:Address/com:Country/com:code='BR' or com:Address/com:Country/com:code='IO' or com:Address/com:Country/com:code='BN' or com:Address/com:Country/com:code='BG' or com:Address/com:Country/com:code='BF' or com:Address/com:Country/com:code='BI' or com:Address/com:Country/com:code='KH' or com:Address/com:Country/com:code='CM' or com:Address/com:Country/com:code='CA' or com:Address/com:Country/com:code='CV' or com:Address/com:Country/com:code='KY' or com:Address/com:Country/com:code='CF' or com:Address/com:Country/com:code='TD' or com:Address/com:Country/com:code='CL' or com:Address/com:Country/com:code='CN' or com:Address/com:Country/com:code='CX' or com:Address/com:Country/com:code='CC' or com:Address/com:Country/com:code='CO' or com:Address/com:Country/com:code='KM' or com:Address/com:Country/com:code='CG' or com:Address/com:Country/com:code='CD' or com:Address/com:Country/com:code='CK' or com:Address/com:Country/com:code='CR' or com:Address/com:Country/com:code='CI' or com:Address/com:Country/com:code='HR' or com:Address/com:Country/com:code='CU' or com:Address/com:Country/com:code='CY' or com:Address/com:Country/com:code='CZ' or com:Address/com:Country/com:code='DK' or com:Address/com:Country/com:code='DJ' or com:Address/com:Country/com:code='DM' or com:Address/com:Country/com:code='DO' or com:Address/com:Country/com:code='EC' or com:Address/com:Country/com:code='EG' or com:Address/com:Country/com:code='SV' or com:Address/com:Country/com:code='GQ' or com:Address/com:Country/com:code='ER' or com:Address/com:Country/com:code='EE' or com:Address/com:Country/com:code='ET' or com:Address/com:Country/com:code='FK' or com:Address/com:Country/com:code='FO' or com:Address/com:Country/com:code='FJ' or com:Address/com:Country/com:code='FI' or com:Address/com:Country/com:code='FR' or com:Address/com:Country/com:code='GF' or com:Address/com:Country/com:code='PF' or com:Address/com:Country/com:code='TF' or com:Address/com:Country/com:code='GA' or com:Address/com:Country/com:code='GM' or com:Address/com:Country/com:code='GE' or com:Address/com:Country/com:code='DE' or com:Address/com:Country/com:code='GH' or com:Address/com:Country/com:code='GI' or com:Address/com:Country/com:code='GR' or com:Address/com:Country/com:code='GL' or com:Address/com:Country/com:code='GD' or com:Address/com:Country/com:code='GP' or com:Address/com:Country/com:code='GU' or com:Address/com:Country/com:code='GT' or com:Address/com:Country/com:code='GG' or com:Address/com:Country/com:code='GN' or com:Address/com:Country/com:code='GW' or com:Address/com:Country/com:code='GY' or com:Address/com:Country/com:code='HT' or com:Address/com:Country/com:code='HM' or com:Address/com:Country/com:code='VA' or com:Address/com:Country/com:code='HN' or com:Address/com:Country/com:code='HK' or com:Address/com:Country/com:code='HU' or com:Address/com:Country/com:code='IS' or com:Address/com:Country/com:code='IN' or com:Address/com:Country/com:code='ID' or com:Address/com:Country/com:code='IR' or com:Address/com:Country/com:code='IQ' or com:Address/com:Country/com:code='IE' or com:Address/com:Country/com:code='IL' or com:Address/com:Country/com:code='IT' or com:Address/com:Country/com:code='JM' or com:Address/com:Country/com:code='JP' or com:Address/com:Country/com:code='JE' or com:Address/com:Country/com:code='JO' or com:Address/com:Country/com:code='KZ' or com:Address/com:Country/com:code='KE' or com:Address/com:Country/com:code='KI' or com:Address/com:Country/com:code='KP' or com:Address/com:Country/com:code='KR' or com:Address/com:Country/com:code='KW' or com:Address/com:Country/com:code='KG' or com:Address/com:Country/com:code='LA' or com:Address/com:Country/com:code='LV' or com:Address/com:Country/com:code='LB' or com:Address/com:Country/com:code='LS' or com:Address/com:Country/com:code='LR' or com:Address/com:Country/com:code='LY' or com:Address/com:Country/com:code='LI' or com:Address/com:Country/com:code='LT' or com:Address/com:Country/com:code='LU' or com:Address/com:Country/com:code='MO' or com:Address/com:Country/com:code='MK' or com:Address/com:Country/com:code='MG' or com:Address/com:Country/com:code='MW' or com:Address/com:Country/com:code='MY' or com:Address/com:Country/com:code='MV' or com:Address/com:Country/com:code='ML' or com:Address/com:Country/com:code='MT' or com:Address/com:Country/com:code='MH' or com:Address/com:Country/com:code='MQ' or com:Address/com:Country/com:code='MR' or com:Address/com:Country/com:code='MU' or com:Address/com:Country/com:code='YT' or com:Address/com:Country/com:code='MX' or com:Address/com:Country/com:code='FM' or com:Address/com:Country/com:code='MD' or com:Address/com:Country/com:code='MC' or com:Address/com:Country/com:code='MN' or com:Address/com:Country/com:code='MS' or com:Address/com:Country/com:code='MA' or com:Address/com:Country/com:code='MZ' or com:Address/com:Country/com:code='MM' or com:Address/com:Country/com:code='NA' or com:Address/com:Country/com:code='NR' or com:Address/com:Country/com:code='NP' or com:Address/com:Country/com:code='NL' or com:Address/com:Country/com:code='AN' or com:Address/com:Country/com:code='NC' or com:Address/com:Country/com:code='NZ' or com:Address/com:Country/com:code='NI' or com:Address/com:Country/com:code='NE' or com:Address/com:Country/com:code='NG' or com:Address/com:Country/com:code='NU' or com:Address/com:Country/com:code='NF' or com:Address/com:Country/com:code='MP' or com:Address/com:Country/com:code='NO' or com:Address/com:Country/com:code='OM' or com:Address/com:Country/com:code='PK' or com:Address/com:Country/com:code='PW' or com:Address/com:Country/com:code='PS' or com:Address/com:Country/com:code='PA' or com:Address/com:Country/com:code='PG' or com:Address/com:Country/com:code='PY' or com:Address/com:Country/com:code='PE' or com:Address/com:Country/com:code='PH' or com:Address/com:Country/com:code='PN' or com:Address/com:Country/com:code='PL' or com:Address/com:Country/com:code='PT' or com:Address/com:Country/com:code='PR' or com:Address/com:Country/com:code='QA' or com:Address/com:Country/com:code='RE' or com:Address/com:Country/com:code='RO' or com:Address/com:Country/com:code='RU' or com:Address/com:Country/com:code='RW' or com:Address/com:Country/com:code='SH' or com:Address/com:Country/com:code='KN' or com:Address/com:Country/com:code='LC' or com:Address/com:Country/com:code='PM' or com:Address/com:Country/com:code='VC' or com:Address/com:Country/com:code='WS' or com:Address/com:Country/com:code='SM' or com:Address/com:Country/com:code='ST' or com:Address/com:Country/com:code='SA' or com:Address/com:Country/com:code='SN' or com:Address/com:Country/com:code='CS' or com:Address/com:Country/com:code='SC' or com:Address/com:Country/com:code='SG' or com:Address/com:Country/com:code='SK' or com:Address/com:Country/com:code='SI' or com:Address/com:Country/com:code='SB' or com:Address/com:Country/com:code='SO' or com:Address/com:Country/com:code='ZA' or com:Address/com:Country/com:code='GS' or com:Address/com:Country/com:code='ES' or com:Address/com:Country/com:code='LK' or com:Address/com:Country/com:code='SD' or com:Address/com:Country/com:code='SR' or com:Address/com:Country/com:code='SJ' or com:Address/com:Country/com:code='SZ' or com:Address/com:Country/com:code='SE' or com:Address/com:Country/com:code='CH' or com:Address/com:Country/com:code='SY' or com:Address/com:Country/com:code='TW' or com:Address/com:Country/com:code='TJ' or com:Address/com:Country/com:code='TZ' or com:Address/com:Country/com:code='TH' or com:Address/com:Country/com:code='TL' or com:Address/com:Country/com:code='TG' or com:Address/com:Country/com:code='TK' or com:Address/com:Country/com:code='TO' or com:Address/com:Country/com:code='TT' or com:Address/com:Country/com:code='TN' or com:Address/com:Country/com:code='TR' or com:Address/com:Country/com:code='TM' or com:Address/com:Country/com:code='TC' or com:Address/com:Country/com:code='TV' or com:Address/com:Country/com:code='UG' or com:Address/com:Country/com:code='UA' or com:Address/com:Country/com:code='AE' or com:Address/com:Country/com:code='GB' or com:Address/com:Country/com:code='US' or com:Address/com:Country/com:code='UM' or com:Address/com:Country/com:code='UY' or com:Address/com:Country/com:code='UZ' or com:Address/com:Country/com:code='VU' or com:Address/com:Country/com:code='VE' or com:Address/com:Country/com:code='VN' or com:Address/com:Country/com:code='VG' or com:Address/com:Country/com:code='VI' or com:Address/com:Country/com:code='WF' or com:Address/com:Country/com:code='EH' or com:Address/com:Country/com:code='YE' or com:Address/com:Country/com:code='ZM' or com:Address/com:Country/com:code='ZW'" > com:Address/com:Country/com:Code should be 2 alpha-numerical characters e.g. ”DK” for Denmark </sch:assert>
  7. com:PayeeFinancialAccount[/pie:Invoice or /pcm:Invoice]::
    1. assert:: <sch:assert test="com:TypeCode = 'null' or com:TypeCode = 'BANK' or com:TypeCode = 'GIRO' or com:TypeCode = 'KREDITORNR' or com:TypeCode = 'FIK' or com:TypeCode = 'BANKGIROT' or com:TypeCode = 'POSTGIROT' or com:TypeCode = 'IBAN'" >
    2. name:: <name > </name>
    3. should equal 'null' ,'BANK','GIRO','KREDITORNR','FIK','BANKGIROT','POSTGIROT', or 'IBAN' </sch:assert>
  8. com:FinancialInstitution[/pie:Invoice or /pcm:Invoice]::
    1. assert:: <sch:assert test="com:ID = 'null' or string-length(com:ID) = 8 or string-length(com:ID) = 11" > com:ID under FinancialInstitution should be null or 8 or 11 character alphanumeric string. 11 Character strings are sometimes used in other countries, hence their allowance here, but otherwise they should be avoided. </sch:assert>
  9. com:PaymentTerms[/pie:Invoice or /pcm:Invoice]::
    1. assert:: <sch:assert test="(/pie:Invoice or /pcm:Invoice) and (com:ID = 'CONTRACT' or com:ID = 'SPECIFIC')" > </sch:assert>
  10. com:AllowanceCharge[/pie:Invoice or /pcm:Invoice]::
    1. assert:: <sch:assert test="com:ID='Rabat' or com:ID='Gebyr' or com:ID='Fragt' or com:ID='Afgift' or com:ID='Told'" >
    2. name:: <name > </name>
    3. should equal 'Rabat','Gebyr','Fragt','Afgift', or 'Told'. </sch:assert>
    4. report:: <sch:report test="com:ChargeIndicator != 'true' and com:ChargeIndicator != 'false'" > ChargeIndicator under AllowanceCharge should equal either true or false </sch:report>
    5. assert:: <sch:assert test="count(com:AllowanceChargeAmount)<2" > Only one one AllowanceCharge amount allowed per allowance charge. </sch:assert>
  11. com:InvoiceLine/com:Item/com:CommodityClassification/com:CommodityCode[@listID='UNSPSC'][/pie:Invoice or /pcm:Invoice]::
    1. report:: <sch:report test="string-length(.) != 10 and string-length(.) != 8" > When the listID is UNSPSC the content of CommodityClassification should be following the UNSPSC recommendation with a 10 or 8 digit number </sch:report>
    2. report:: <sch:report test=". != (. + 1) - 1" > When the listID is UNSPSC the content of CommodityClassification should be following the UNSPSC recommendation with a 10 or 8 digit number </sch:report>
  12. NOTE THE FOLLOWING RULE HAS BEEN REMOVED: IT WAS A RULE MATCHING REQUIREMENTS OF EARLIER 0p71 validation com:InvoiceLine/com:Item/com:Tax/com:TaxScheme/com:ID[/pie:Invoice or /pcm:Invoice]::
    1. assert:: <sch:assert test="string-length(substring-before(.,'-'))=4" > com:ID under com:Item/com:Tax/com:TaxScheme/com:ID is a 'MomsAngivelsesParagraf' in the form of '2004-3-P.1.2.1' </sch:assert>
    2. NOTE THE FOLLOWING RULE HAS BEEN REMOVED: IT WAS A RULE MATCHING REQUIREMENTS OF EARLIER 0p71 validation assert:: <sch:assert test="substring-before(.,'-') = (substring-before(.,'-') + 1) - 1 " > com:ID under com:Item/com:Tax/com:TaxScheme/com:ID is a 'MomsAngivelsesParagraf' in the form of '2004-3-P.1.2.1' </sch:assert>
  13. com:Tax/com:TypeCode[/pie:Invoice or /pcm:Invoice]::
    1. assert:: <sch:assert test=".='VAT' or .='ZERO-RATED'" >
    2. name:: <name > </name>
    3. should equal VAT or ZERO-RATED. </sch:assert>
  14. com:RateCategoryCodeID[/pie:Invoice or /pcm:Invoice]::
    1. assert:: <sch:assert test=".='VAT' or .='ZERO-RATED'" >
    2. name:: <name > </name>
    3. should equal VAT or ZERO-RATED. </sch:assert>
  15. com:TaxTotal/com:TaxTypeCode[/pie:Invoice or /pcm:Invoice]::
    1. assert:: <sch:assert test=".='VAT' or .='ZERO-RATED'" >
    2. name:: <name > </name>
    3. should equal VAT or ZERO-RATED. </sch:assert>
    4. report:: <sch:report test="following-sibling::com:TaxTypeCode[1][.=current()]" > There should only be one VAT or ZERO-RATED
    5. name:: <name > </name>
    6. </sch:report>
    7. report:: <sch:report test="preceding-sibling::com:TaxTypeCode[1][.=current()]" > There should only be one VAT or ZERO-RATED
    8. name:: <name > </name>
    9. </sch:report>
  16. com:InvoiceLine/com:ReferencedOrderLine/com:DeliveryRequirement[/pie:Invoice or /pcm:Invoice]::
    1. assert:: <sch:assert test="com:ID='Deliverydate' or com:ID ='Period'" > ReferencedOrderLine - DeliveryRequirement - ID should equal DeliveryDate or Period. </sch:assert>
    2. assert:: <sch:assert test="count(com:DeliverySchedule)<5" > DeliveryScedule under com:InvoiceLine/com:ReferencedOrderLine/com:DeliveryRequirement should be less than 5 </sch:assert>
  17. com:MultiplierFactorQuantity[/pie:Invoice or /pcm:Invoice] | com:InvoicedQuantity[/pie:Invoice or /pcm:Invoice] | com:BaseQuantity[/pie:Invoice or /pcm:Invoice]::
    1. assert:: <sch:assert test="string-length(@unitCode) > 1" > the unitCode attribute must be filled out </sch:assert>
    2. assert:: <sch:assert test="@unitCodeListAgencyID='UN/UOM' or @unitCodeListAgencyID='n/a'" > The unitCodeListAgencyID should = UN/UOM or n/a </sch:assert>

Added assertions

  1. string-length(com:ID)>0::
      WARNING: there should be some value in ID under BuyerParty
  2. string-length(com:ID)>0::
      WARNING: there should be some value in ID under BuyerParty
  3. com:Address/com:Country/com:code='AF' or com:Address/com:Country/com:code='AX' or com:Address/com:Country/com:code='AL' or com:Address/com:Country/com:code='DZ' or com:Address/com:Country/com:code='AS' or com:Address/com:Country/com:code='AD' or com:Address/com:Country/com:code='AO' or com:Address/com:Country/com:code='AI' or com:Address/com:Country/com:code='AQ' or com:Address/com:Country/com:code='AG' or com:Address/com:Country/com:code='AR' or com:Address/com:Country/com:code='AM' or com:Address/com:Country/com:code='AW' or com:Address/com:Country/com:code='AU' or com:Address/com:Country/com:code='AT' or com:Address/com:Country/com:code='AZ' or com:Address/com:Country/com:code='BS' or com:Address/com:Country/com:code='BH' or com:Address/com:Country/com:code='BD' or com:Address/com:Country/com:code='BB' or com:Address/com:Country/com:code='BY' or com:Address/com:Country/com:code='BE' or com:Address/com:Country/com:code='BZ' or com:Address/com:Country/com:code='BJ' or com:Address/com:Country/com:code='BM' or com:Address/com:Country/com:code='BT' or com:Address/com:Country/com:code='BO' or com:Address/com:Country/com:code='BA' or com:Address/com:Country/com:code='BW' or com:Address/com:Country/com:code='BV' or com:Address/com:Country/com:code='BR' or com:Address/com:Country/com:code='IO' or com:Address/com:Country/com:code='BN' or com:Address/com:Country/com:code='BG' or com:Address/com:Country/com:code='BF' or com:Address/com:Country/com:code='BI' or com:Address/com:Country/com:code='KH' or com:Address/com:Country/com:code='CM' or com:Address/com:Country/com:code='CA' or com:Address/com:Country/com:code='CV' or com:Address/com:Country/com:code='KY' or com:Address/com:Country/com:code='CF' or com:Address/com:Country/com:code='TD' or com:Address/com:Country/com:code='CL' or com:Address/com:Country/com:code='CN' or com:Address/com:Country/com:code='CX' or com:Address/com:Country/com:code='CC' or com:Address/com:Country/com:code='CO' or com:Address/com:Country/com:code='KM' or com:Address/com:Country/com:code='CG' or com:Address/com:Country/com:code='CD' or com:Address/com:Country/com:code='CK' or com:Address/com:Country/com:code='CR' or com:Address/com:Country/com:code='CI' or com:Address/com:Country/com:code='HR' or com:Address/com:Country/com:code='CU' or com:Address/com:Country/com:code='CY' or com:Address/com:Country/com:code='CZ' or com:Address/com:Country/com:code='DK' or com:Address/com:Country/com:code='DJ' or com:Address/com:Country/com:code='DM' or com:Address/com:Country/com:code='DO' or com:Address/com:Country/com:code='EC' or com:Address/com:Country/com:code='EG' or com:Address/com:Country/com:code='SV' or com:Address/com:Country/com:code='GQ' or com:Address/com:Country/com:code='ER' or com:Address/com:Country/com:code='EE' or com:Address/com:Country/com:code='ET' or com:Address/com:Country/com:code='FK' or com:Address/com:Country/com:code='FO' or com:Address/com:Country/com:code='FJ' or com:Address/com:Country/com:code='FI' or com:Address/com:Country/com:code='FR' or com:Address/com:Country/com:code='GF' or com:Address/com:Country/com:code='PF' or com:Address/com:Country/com:code='TF' or com:Address/com:Country/com:code='GA' or com:Address/com:Country/com:code='GM' or com:Address/com:Country/com:code='GE' or com:Address/com:Country/com:code='DE' or com:Address/com:Country/com:code='GH' or com:Address/com:Country/com:code='GI' or com:Address/com:Country/com:code='GR' or com:Address/com:Country/com:code='GL' or com:Address/com:Country/com:code='GD' or com:Address/com:Country/com:code='GP' or com:Address/com:Country/com:code='GU' or com:Address/com:Country/com:code='GT' or com:Address/com:Country/com:code='GG' or com:Address/com:Country/com:code='GN' or com:Address/com:Country/com:code='GW' or com:Address/com:Country/com:code='GY' or com:Address/com:Country/com:code='HT' or com:Address/com:Country/com:code='HM' or com:Address/com:Country/com:code='VA' or com:Address/com:Country/com:code='HN' or com:Address/com:Country/com:code='HK' or com:Address/com:Country/com:code='HU' or com:Address/com:Country/com:code='IS' or com:Address/com:Country/com:code='IN' or com:Address/com:Country/com:code='ID' or com:Address/com:Country/com:code='IR' or com:Address/com:Country/com:code='IQ' or com:Address/com:Country/com:code='IE' or com:Address/com:Country/com:code='IL' or com:Address/com:Country/com:code='IT' or com:Address/com:Country/com:code='JM' or com:Address/com:Country/com:code='JP' or com:Address/com:Country/com:code='JE' or com:Address/com:Country/com:code='JO' or com:Address/com:Country/com:code='KZ' or com:Address/com:Country/com:code='KE' or com:Address/com:Country/com:code='KI' or com:Address/com:Country/com:code='KP' or com:Address/com:Country/com:code='KR' or com:Address/com:Country/com:code='KW' or com:Address/com:Country/com:code='KG' or com:Address/com:Country/com:code='LA' or com:Address/com:Country/com:code='LV' or com:Address/com:Country/com:code='LB' or com:Address/com:Country/com:code='LS' or com:Address/com:Country/com:code='LR' or com:Address/com:Country/com:code='LY' or com:Address/com:Country/com:code='LI' or com:Address/com:Country/com:code='LT' or com:Address/com:Country/com:code='LU' or com:Address/com:Country/com:code='MO' or com:Address/com:Country/com:code='MK' or com:Address/com:Country/com:code='MG' or com:Address/com:Country/com:code='MW' or com:Address/com:Country/com:code='MY' or com:Address/com:Country/com:code='MV' or com:Address/com:Country/com:code='ML' or com:Address/com:Country/com:code='MT' or com:Address/com:Country/com:code='MH' or com:Address/com:Country/com:code='MQ' or com:Address/com:Country/com:code='MR' or com:Address/com:Country/com:code='MU' or com:Address/com:Country/com:code='YT' or com:Address/com:Country/com:code='MX' or com:Address/com:Country/com:code='FM' or com:Address/com:Country/com:code='MD' or com:Address/com:Country/com:code='MC' or com:Address/com:Country/com:code='MN' or com:Address/com:Country/com:code='MS' or com:Address/com:Country/com:code='MA' or com:Address/com:Country/com:code='MZ' or com:Address/com:Country/com:code='MM' or com:Address/com:Country/com:code='NA' or com:Address/com:Country/com:code='NR' or com:Address/com:Country/com:code='NP' or com:Address/com:Country/com:code='NL' or com:Address/com:Country/com:code='AN' or com:Address/com:Country/com:code='NC' or com:Address/com:Country/com:code='NZ' or com:Address/com:Country/com:code='NI' or com:Address/com:Country/com:code='NE' or com:Address/com:Country/com:code='NG' or com:Address/com:Country/com:code='NU' or com:Address/com:Country/com:code='NF' or com:Address/com:Country/com:code='MP' or com:Address/com:Country/com:code='NO' or com:Address/com:Country/com:code='OM' or com:Address/com:Country/com:code='PK' or com:Address/com:Country/com:code='PW' or com:Address/com:Country/com:code='PS' or com:Address/com:Country/com:code='PA' or com:Address/com:Country/com:code='PG' or com:Address/com:Country/com:code='PY' or com:Address/com:Country/com:code='PE' or com:Address/com:Country/com:code='PH' or com:Address/com:Country/com:code='PN' or com:Address/com:Country/com:code='PL' or com:Address/com:Country/com:code='PT' or com:Address/com:Country/com:code='PR' or com:Address/com:Country/com:code='QA' or com:Address/com:Country/com:code='RE' or com:Address/com:Country/com:code='RO' or com:Address/com:Country/com:code='RU' or com:Address/com:Country/com:code='RW' or com:Address/com:Country/com:code='SH' or com:Address/com:Country/com:code='KN' or com:Address/com:Country/com:code='LC' or com:Address/com:Country/com:code='PM' or com:Address/com:Country/com:code='VC' or com:Address/com:Country/com:code='WS' or com:Address/com:Country/com:code='SM' or com:Address/com:Country/com:code='ST' or com:Address/com:Country/com:code='SA' or com:Address/com:Country/com:code='SN' or com:Address/com:Country/com:code='CS' or com:Address/com:Country/com:code='SC' or com:Address/com:Country/com:code='SG' or com:Address/com:Country/com:code='SK' or com:Address/com:Country/com:code='SI' or com:Address/com:Country/com:code='SB' or com:Address/com:Country/com:code='SO' or com:Address/com:Country/com:code='ZA' or com:Address/com:Country/com:code='GS' or com:Address/com:Country/com:code='ES' or com:Address/com:Country/com:code='LK' or com:Address/com:Country/com:code='SD' or com:Address/com:Country/com:code='SR' or com:Address/com:Country/com:code='SJ' or com:Address/com:Country/com:code='SZ' or com:Address/com:Country/com:code='SE' or com:Address/com:Country/com:code='CH' or com:Address/com:Country/com:code='SY' or com:Address/com:Country/com:code='TW' or com:Address/com:Country/com:code='TJ' or com:Address/com:Country/com:code='TZ' or com:Address/com:Country/com:code='TH' or com:Address/com:Country/com:code='TL' or com:Address/com:Country/com:code='TG' or com:Address/com:Country/com:code='TK' or com:Address/com:Country/com:code='TO' or com:Address/com:Country/com:code='TT' or com:Address/com:Country/com:code='TN' or com:Address/com:Country/com:code='TR' or com:Address/com:Country/com:code='TM' or com:Address/com:Country/com:code='TC' or com:Address/com:Country/com:code='TV' or com:Address/com:Country/com:code='UG' or com:Address/com:Country/com:code='UA' or com:Address/com:Country/com:code='AE' or com:Address/com:Country/com:code='GB' or com:Address/com:Country/com:code='US' or com:Address/com:Country/com:code='UM' or com:Address/com:Country/com:code='UY' or com:Address/com:Country/com:code='UZ' or com:Address/com:Country/com:code='VU' or com:Address/com:Country/com:code='VE' or com:Address/com:Country/com:code='VN' or com:Address/com:Country/com:code='VG' or com:Address/com:Country/com:code='VI' or com:Address/com:Country/com:code='WF' or com:Address/com:Country/com:code='EH' or com:Address/com:Country/com:code='YE' or com:Address/com:Country/com:code='ZM' or com:Address/com:Country/com:code='ZW'::
      com:Address/com:Country/com:Code should be 2 alpha-numerical characters e.g. ”DK” for Denmark
  4. @schemeID='EAN'::
      WARNING: It is a best practice to put an schemeID attribute on BuyersReferenceID with a value equalling EAN
  5. @schemeID='EAN'::
      WARNING: It is a best practice to put an schemeID attribute on BuyersReferenceID with a value equalling EAN
  6. com:PaymentChannelCode='INDBETALINGSKORT' or com:PaymentChannelCode='KONTOOVERFØRSEL' or com:PaymentChannelCode='NATIONAL CLEARING' or com:PaymentChannelCode='DIRECT'::
      com:PaymentChannelCode should equal INDBETALINGSKORT or KONTOOVERFØRSEL or NATIONAL CLEARING or DIRECT

Added Reports