Views: 34
JP PINT Basic Rule生成スクリプトによるサンプル検証と公開仕様の不整合
2026-05-10
本件:PEPPOL-23541 Inconsistency between JP PINT downloaded example file and syntax binding
について、Help Desk から次の回答がありました。(2026-05-12)
Issue 1: cbc:UBLVersionID については、Japan PA に通知するとのことです。また、この要素は本来含まれるべきではない、との明確な回答でした。
Issue 2: Tax Scheme ID については、既知の問題であり、2026-Q2 リリースで修正予定とのことです。
JP PINT の仕様本文、syntax binding、サンプル XML、検証ルールの整合性に関わる問題ですので、今後の更新内容を引き続き確認したいと思います。
1. はじめに
JP PINT の適合性検証では、通常、Shared PINT rules や Japanese jurisdiction specific rules によって、必須項目、コードリスト、税制固有条件、金額計算などが検証される。
しかし、それだけでは、UBL 2.1 のスキーマ上は許容されるが、JP PINT の syntax binding には定義されていない要素が XML インスタンス中に含まれているかどうかを、包括的に検出できるとは限らない。
そこで、JP PINT の syntax binding を基礎として、各親要素ごとに許容される子要素と属性を抽出し、それ以外を拒否する Basic Model Rule を機械生成する Python スクリプト [1] を試作した。
この検証の過程で、JP PINT 2025-Q4 のダウンロードサンプルと公開 syntax binding の間に、少なくとも二つの不整合があることを確認した。
本稿では、OpenPeppol Operation Office へ報告した不整合、今回開発した Basic Rule 生成スクリプト、生成した Schematron [2] によるサンプル検証結果を整理する。
2. 背景: なぜBasic Ruleが必要か
JP PINT の syntax binding は、ubl:Invoice 配下に、各 IBT/IBG がどの UBL 要素や属性に対応するかを定義している [3]。
たとえば、cbc:CustomizationID、cbc:ProfileID、cbc:ID、cbc:IssueDate、cbc:DocumentCurrencyCode、cac:AccountingSupplierParty、cac:TaxTotal、cac:InvoiceLine などが、JP PINT のデータモデルに対応する UBL 要素として定義されている。
しかし、UBL 2.1 の schema は JP PINT より広い構造を許容する。
そのため、UBL schema validation で妥当であっても、JP PINT data model として妥当であるとは限らない。
この違いは、次のように整理できる。
1. UBL schema validity
UBL 2.1 の XML schema として正しいこと。
2. JP PINT data model validity
JP PINT syntax binding に定義された要素・属性だけを使っていること。
Basic Rule は、このうち 2 を検証するための rule である。
3. OpenPeppol BIS Billing 3.0とPINT EUにおけるBasic Rule相当のルール
JP PINT の Basic Rule を検討するうえでは、OpenPeppol BIS Billing 3.0 と PINT EU における既存の rule 構成が参考になる。
OpenPeppol BIS Billing 3.0 の Rules は、大きく EN 16931 model bound to UBL と Peppol BIS 固有 rule に分けて公開されている [4][5][6]。
このうち、Basic Rule 相当の役割に近いのは、UBL-CR-* 系の rule である。
UBL-CR-* は、UBL schema 上は存在し得るが、BIS Billing の data model としては使用すべきでない要素を検出する rule 群である。たとえば、UBL-CR-001 は ext:UBLExtensions を含めるべきでないことを、UBL-CR-002 は cbc:UBLVersionID を含めない、または含める場合は 2.1 であることを検証する。
UBL-CR-001
A UBL invoice should not include extensions.
UBL-CR-002
A UBL invoice should not include the UBLVersionID or it should be 2.1.
ただし、BIS Billing の UBL-CR- は、多くの場合 warning として扱われる。これは、OpenPeppol の Invoice Response で見られるような、同じ pattern 内の具体 rule に該当しない要素を parent/ と test="false()" で拒否する fallback rule とは実装方式が異なる。
PINT EU でも、Schematron は Shared PINT rules、EN16931 specific PINT rules、EU Peppol specific PINT rules などに分けて公開されている [7]。
Shared PINT rules では、IBR- や IBR-CL- によって、PINT 共通の必須項目、コードリスト、基本的な business rule が定義されている [8]。
一方、PINT EU の EN16931 specific PINT rules には、UBL-CR-* 系の rule が含まれている [9]。これらは、BIS Billing と同様に、UBL schema 上は存在し得るが PINT/EN16931 data model としては使用すべきでない要素を検出する役割を持つ。
たとえば、PINT EU の UBL-CR-002 では、cbc:UBLVersionID について次のような条件が定義されている [10]。
このことは、JP PINT においても重要である。
JP PINT で cbc:UBLVersionID を許容するのであれば、BIS Billing や PINT EU の UBL-CR-002 と同様に、明示的な rule として扱う必要がある。一方、JP PINT syntax binding に定義しないのであれば、公式サンプルにも含めるべきではない。
このように、OpenPeppol BIS Billing 3.0 や PINT EU では、business rule とは別に、UBL schema と data model の差分を検出する rule 群が提供されている。JP PINT においても、同様の Basic Rule 相当の仕組みを syntax binding から機械生成し、AP、SMP、検証サービス、実装者で共有できるようにすることが望ましい。
4. 今回使用したSyntax binding treeについて
今回のサンプル検証では、Peppol Authority から公開されている JP PINT の Syntax binding ページを直接スクレイピング対象にはしなかった。
理由は、公開されている Syntax binding が、XML 文書として UBL との対応関係を機械的に抽出しやすい構造になっていないことに加え、cac:TaxTotal の selector などに誤りを含んでいるためである。
たとえば、IBG-37 の tax accounting currency 用 cac:TaxTotal selector については、以前から次のような問題を指摘している。
cac:TaxTotal/TaxAmount/@currency = cbc:TaxCurrencyCode
この表記は、UBL XML 構造として次の点で問題がある。
1. TaxAmount は cbc:TaxAmount である。
2. UBL の通貨属性は @currencyID であり、@currency ではない。
3. cbc:TaxCurrencyCode は document level の要素であり、cac:TaxTotal の子要素ではない。
4. selector は cac:TaxTotal を選択する predicate として表現されるべきである。
したがって、意図される selector は、概念的には次のような形になる。
/Invoice/cac:TaxTotal[
cbc:TaxAmount/@currencyID = /Invoice/cbc:TaxCurrencyCode
]
このような理由から、今回の Basic Rule 生成では、2022年頃に当事務所で公開した JP PINT 1.0 版のテストサイトを使用した。
参照サイトは次のとおりである。
このサイトでは、Syntax binding を二つの方向から参照できる画面を提供している。
1. セマンティックモデル側から参照する画面
2. UBL syntax 側から参照する画面
今回の Basic Rule 生成では、このうち UBL syntax 側から参照する画面を使用した。
Syntax Binding (UBL → Semantic model) : BeautifulSoupでスクレイピング
具体的には、次のような XPath 風の tree 表示をスクレイピングし、親要素ごとに許容される子要素および属性を抽出した。
/Invoice/cbc:CustomizationID
/Invoice/cbc:ProfileID
/Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID
/Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID
/Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode != '130']/cac:Attachment
/Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID = /Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal
...
この tree 表示では、/Invoice を root として表示しているが、Schematron 生成時には、これを /ubl:Invoice に正規化している。
また、cbc:DocumentTypeCode != '130' については、cbc:DocumentTypeCode が存在しない supporting document も対象に含める必要があるため、次のように変換している。
not(cbc:DocumentTypeCode = '130')
一方、cbc:ID/@schemeID = 'SEPA'、cbc:ID/@schemeID != 'SEPA'、cac:TaxScheme/cbc:ID = 'VAT' などの selector は、必須項目であり、値の比較を厳格に扱うため、normalize-space(.) などによる正規化は行わず、元の比較条件を維持している。
今回の検証では、このテストサイトの UBL syntax tree [12] を Python の BeautifulSoup ライブラリでスクレイピングし、抽出した情報から Basic Model Schematron を生成した。そのうえで、生成した Schematron を JP PINT 2025-Q4 のダウンロードサンプル [13] に適用した。
したがって、今回の検証結果は、少なくとも次の三つの整合性を確認する試みである。
1. JP PINT syntax binding が UBL syntax と整合しているか。
2. syntax binding から機械生成した Basic Rule が実際の XML サンプルに適用できるか。
3. 公式ダウンロードサンプルが syntax binding と整合しているか。
5. 今回作成したBasic Rule生成スクリプト
今回作成した Python スクリプト [1] は、JP PINT の syntax binding tree ページを読み取り、親要素ごとに許容される子要素と属性を抽出し、Schematron を生成する。
入力として想定しているのは、次のような syntax binding tree 形式である。
/Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID
/Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID
/Invoice/cac:PartyIdentification[cbc:ID/@schemeID != 'SEPA']/cbc:ID
/Invoice/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID
/Invoice/.../cbc:ID/@schemeID
スクリプトでは、/Invoice を、Schematron 用の XPath として /ubl:Invoice に正規化する。
また、JP PINT syntax binding に含まれる selector のうち、cbc:DocumentTypeCode != '130' だけは特別に扱う。
cbc:DocumentTypeCode = '130' の場合は invoiced object identifier を示す。
一方、cbc:DocumentTypeCode != '130' の場合は additional supporting document を示すが、この場合、cbc:DocumentTypeCode が存在しない supporting document も対象に含める必要がある。
そのため、次のように変換する。
[cbc:DocumentTypeCode = '130']
-> [cbc:DocumentTypeCode = '130']
[cbc:DocumentTypeCode != '130']
-> [not(cbc:DocumentTypeCode = '130')]
一方、次のような selector は、厳格な比較としてそのまま残す。
[cbc:ID/@schemeID = 'SEPA']
[cbc:ID/@schemeID != 'SEPA']
[cac:TaxScheme/cbc:ID = 'VAT']
[cac:TaxScheme/cbc:ID != 'VAT']
6. 生成されるSchematronの考え方
生成する Schematron [2] には、二つの方式を用意した。
一つは、OpenPeppol の Invoice Response で見られる fallback rule に近い方式である。
<sch:rule context="parent/allowed-child1"/>
<sch:rule context="parent/allowed-child2"/>
<sch:rule context="parent/allowed-child3"/>
<sch:rule context="parent/*">
<sch:assert test="false()">
Document MUST NOT contain child elements that are not part of the JP PINT data model.
</sch:assert>
</sch:rule>
この方式では、許可された子要素ごとに空の rule を置き、最後に parent/* の fallback rule を置く。
もう一つは、Validator Buddy などで空 rule の shadowing が期待どおりに動かない場合を考慮した whitelist 方式である。
<sch:rule context="parent/*">
<sch:assert test="
self::allowed-child-1 or
self::allowed-child-2 or
self::allowed-child-3
">
Document MUST NOT contain child elements that are not part of the JP PINT data model.
</sch:assert>
</sch:rule>
実装上は、後者の whitelist 方式の方が、多くの Schematron 処理系で安定して動作すると考えられる。
7. 検証対象のサンプル
今回の検証では、JP PINT 2025-Q4 の download resource に含まれる次のサンプル [0] を対象とした。
Japan PINT Invoice UBL Example2-TaxAcctCur.xml
このサンプルは、外貨建て請求書であり、文書通貨と税会計通貨が異なる例である。
サンプルでは、文書通貨として EUR、税会計通貨として JPY が指定されている。
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:TaxCurrencyCode>JPY</cbc:TaxCurrencyCode>
また、税会計通貨用の cac:TaxTotal には、次の構造が含まれている。
<cac:TaxTotal>
<cbc:TaxAmount currencyID="JPY">32500</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxAmount currencyID="JPY">32500</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>10</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
この cac:TaxScheme/cbc:ID が、今回の重要な検出点である。
8. サンプル検証で検出された不整合
生成した JP PINT Basic Model Schematron を用いて、ダウンロードサンプルを検証したところ、主に次の二つの不整合が検出された。
1. cbc:UBLVersionID がサンプルに含まれているが、syntax binding には定義されていない。
2. 税会計通貨の Tax breakdown に cac:TaxScheme/cbc:ID が含まれているが、syntax binding には対応する IBT が定義されていない。
8.1. 不整合1: cbc:UBLVersionID
サンプルには、次の要素が含まれている。
<cbc:UBLVersionID>2.1</cbc:UBLVersionID>
しかし、JP PINT 2025-Q4 の syntax binding では、ubl:Invoice 直下の JP PINT data model 要素として cbc:UBLVersionID を確認できない。
したがって、Basic Model Rule では、これは JP PINT data model に含まれない要素として検出される。
この不整合は、次のどちらかの方法で解消する必要がある。
A. サンプルから cbc:UBLVersionID を削除する。
B. syntax binding に cbc:UBLVersionID を明示的に許容要素として追加する。
BIS Billing では、UBLVersionID を含めない、または 2.1 とする、といった UBL-CR 系 rule で扱われている。
JP PINT でも同様に扱うのであれば、syntax binding あるいは Basic Rule 側で明示する必要がある。
8.2. 不整合2: 税会計通貨Tax breakdownのcac:TaxScheme
文書通貨の tax breakdown では、cac:TaxCategory の下に次の構造が定義されている。
cac:TaxCategory
cbc:ID
cbc:Percent
cac:TaxScheme
cbc:ID
これは、IBT-118-1 と同様の tax scheme code として理解できる。
一方、税会計通貨の tax breakdown では、syntax binding 上、次の構造までしか Business Term が定義されていない。
cac:TaxCategory
cbc:ID
cbc:Percent
しかし、ダウンロードサンプルには、税会計通貨の cac:TaxCategory 配下に次の構造が含まれている。
cac:TaxCategory
cbc:ID
cbc:Percent
cac:TaxScheme
cbc:ID
このため、syntax binding を JP PINT data model の正本として Basic Model Rule を生成すると、サンプル中の cac:TaxScheme/cbc:ID は未定義要素として検出される。
8.2.1. BIS Billing 3.0およびPINT EUとの比較
この点について、BIS Billing 3.0 および PINT EU の syntax binding と比較すると、JP PINT のダウンロードサンプルは異なる構造を採っているように見える。
BIS Billing 3.0 では、税会計通貨コードが提供される場合、二つの cac:TaxTotal が必要になるが、cac:TaxSubtotal を持つのは一つだけであると説明されている [14]。
When tax currency code is provided, two instances of the tax total must be present,
but only one with tax subtotal.
また、BIS Billing 3.0 の cac:TaxTotal でも、cbc:TaxAmount は必須、cac:TaxSubtotal は 0..n として定義されているが、PEPPOL-EN16931-R054 により、税会計通貨コードが提供される場合には、cac:TaxSubtotal を持たない tax total が一つだけ存在しなければならないとされている [15]。
このため、BIS Billing 3.0 の考え方では、税会計通貨側の cac:TaxTotal は、基本的に次の構造になる。
cac:TaxTotal
cbc:TaxAmount
一方、文書通貨側の通常の tax breakdown では、cac:TaxSubtotal/cac:TaxCategory の下に cac:TaxScheme が定義されている。BIS Billing 3.0 の cac:TaxCategory では、cbc:ID、cbc:Percent、cbc:TaxExemptionReasonCode、cbc:TaxExemptionReason に加え、cac:TaxScheme が 1..1 として定義されている [16]。
cac:TaxSubtotal
cac:TaxCategory
cbc:ID
cbc:Percent
cbc:TaxExemptionReasonCode
cbc:TaxExemptionReason
cac:TaxScheme
cbc:ID
さらに、cac:TaxScheme/cbc:ID は必須であり、値として VAT を使用することが示されている [17]。
つまり、BIS Billing 3.0 では、cac:TaxScheme/cbc:ID は通常の tax breakdown 側には存在するが、税会計通貨側の cac:TaxTotal には cac:TaxSubtotal 自体を持たせない構造になっている。
PINT EU でも同様に、通常の tax breakdown では IBT-118-1 として tax scheme code が定義されている。PINT EU の syntax binding では、IBG-23 TAX BREAKDOWN の cac:TaxCategory 配下に cac:TaxScheme があり、その下に IBT-118-1 Tax scheme code として cbc:ID が定義されている [18]。
IBG-23 TAX BREAKDOWN
cac:TaxSubtotal
cac:TaxCategory
cbc:ID
cbc:Percent
cac:TaxScheme
cbc:ID
これに対して、PINT EU の IBG-37 DOCUMENT TOTALS IN TAX ACCOUNTING CURRENCY では、cac:TaxTotal の下に IBT-111 Invoice total TAX amount in tax accounting currency として cbc:TaxAmount が定義され、その @currencyID が定義されるだけである。cac:TaxSubtotal、cac:TaxCategory、cac:TaxScheme は定義されていない [18]。
IBG-37 DOCUMENT TOTALS IN TAX ACCOUNTING CURRENCY
cac:TaxTotal
cbc:TaxAmount
@currencyID
したがって、BIS Billing 3.0 および PINT EU と比較すると、JP PINT のダウンロードサンプルに含まれる次の構造は、少なくともそのままでは整合しない。
cac:TaxTotal
[cbc:TaxAmount/@currencyID = /ubl:Invoice/cbc:TaxCurrencyCode]
cac:TaxSubtotal
cac:TaxCategory
cbc:ID
cbc:Percent
cac:TaxScheme
cbc:ID
このため、JP PINT としては、次のいずれかを明確にする必要がある。
1. BIS Billing 3.0 / PINT EU と同様に、税会計通貨側の cac:TaxTotal には
cac:TaxSubtotal を含めない。
この場合、ダウンロードサンプルを訂正する必要がある。
2. JP PINT 固有要件として、税会計通貨側にも cac:TaxSubtotal/cac:TaxCategory を
持たせる。
この場合、syntax binding に IBT-192-1 などの Business Term を追加し、
cac:TaxScheme/cbc:ID まで明示する必要がある。
現状では、ダウンロードサンプルは 2 の構造を採っているように見える一方、公開 syntax binding はそこまで定義していない。このため、サンプルと syntax binding のどちらを正とするのかを明確にしない限り、JP PINT 公開仕様パッケージとしての内部一貫性に欠ける。
|
Note
|
日本の消費税では、税率ごとの合計税額について、税率ごとに対象となる明細行の金額を合計したうえで、一度だけ端数処理を行って算出し、その金額を記載することが求められている。 この点で、欧州の VAT と日本の消費税には制度上の違いがある。そのため、JP PINT が BIS Billing 3.0 や PINT EU とは異なる構造を必要とすること自体はあり得る。 しかし、その差異が JP PINT 固有の要件として必要であるならば、対応する Business Term と syntax binding として明示されていなければならない。現在のように、ダウンロードサンプルには税会計通貨側の cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID が含まれている一方で、公開 syntax binding にはその構造が定義されていない状態は、仕様として不十分である。これは、2020年から2022年当時の JP PINT 導入検討において、税会計通貨に関する UBL 構造と syntax binding の技術的検証が十分ではなかった可能性を示しているように思われる。 |
9. OpenPeppol Operation Officeへの報告
この不整合について、OpenPeppol Operation Office へ、ダウンロードサンプルと公開 syntax binding の間の整合性問題として報告した。
重要なのは、この報告は単に PEPPOL-22903 の追加論点ではなく、公式 download resource に含まれるサンプルと公開 syntax binding の不整合として整理した点である。
報告の要点は次のとおりである。
Subject:
Inconsistency between JP PINT downloaded example file and syntax binding
Downloaded example file:
Japan PINT Invoice UBL Example2-TaxAcctCur.xml
Downloaded resource:
https://docs.peppol.eu/poac/jp/2025-Q4/pint-jp/resources.zip
Reference syntax binding page:
https://docs.peppol.eu/poac/jp/2025-Q4/pint-jp/trn-invoice/syntax/
報告では、次の二つの不整合を指摘した。
| No. | サンプルに含まれる構造 | syntax binding上の問題 |
|---|---|---|
|
1 |
|
JP PINT syntax binding に定義されていない。 |
|
2 |
税会計通貨の |
文書通貨側には対応構造があるが、税会計通貨側には対応する IBT が定義されていない。 |
したがって、次のどちらかの訂正が必要である。
1. サンプルを syntax binding に合わせて訂正する。
2. syntax binding をサンプルに合わせて訂正する。
どちらの訂正も行わない場合、公開仕様パッケージの内部一貫性に欠けることになる。
10. IBT-192-1としての追加提案
税会計通貨側の cac:TaxScheme/cbc:ID については、単に UBL 要素として追加するのではなく、Business Term として明示する必要がある。
文書通貨側では、IBT-118 の tax category code に対して、cac:TaxScheme/cbc:ID が qualifier として扱われている。
したがって、税会計通貨側でも、IBT-192 に対応する qualifier として、たとえば次の Business Term を追加するのが自然である。
IBT-192-1
Tax scheme code for tax accounting currency tax breakdown
提案する構造は次のとおりである。
IBG-37 DOCUMENT TOTALS IN TAX ACCOUNTING CURRENCY
cac:TaxTotal
[cbc:TaxAmount/@currencyID = /ubl:Invoice/cbc:TaxCurrencyCode]
cac:TaxSubtotal
cac:TaxCategory
cbc:ID
cbc:Percent
cac:TaxScheme
cbc:ID
これは、文書通貨側の tax breakdown と同じ cac:TaxCategory 構造に揃えるものである。
11. PEPPOL-22903との関係
この不整合は、先に報告した PEPPOL-22903 とも関連する。
PEPPOL-22903 では、IBG-37 の cac:TaxTotal selector に関して、公開 syntax binding 上の表記が UBL XML 構造と整合していないことを指摘した。
公開されていた selector は、概念的には次のような表記であった。
cac:TaxTotal/TaxAmount/@currency = cbc:TaxCurrencyCode
しかし、UBL では TaxAmount は cbc:TaxAmount であり、通貨属性は @currencyID である。
また、cbc:TaxCurrencyCode は cac:TaxTotal の子ではなく、document level の要素である。
したがって、意図される selector は次のような形になるはずである。
/ubl:Invoice/cac:TaxTotal[
cbc:TaxAmount/@currencyID = /ubl:Invoice/cbc:TaxCurrencyCode
]
今回の報告は、この selector を正しく解釈した後に、その選択された cac:TaxTotal の配下構造が syntax binding とサンプルで一致していない、という問題である。
つまり、PEPPOL-22903 は cac:TaxTotal の選択条件に関する問題であり、本稿で扱う問題は、選択された cac:TaxTotal の子構造に関する問題である。
12. Basic Rule生成によって分かったこと
今回の検証から、Basic Rule を syntax binding から機械生成することには、少なくとも次の意義があることが分かった。
| 観点 | 意義 |
|---|---|
|
仕様の一貫性確認 |
公開 syntax binding と公式サンプルの不整合を機械的に検出できる。 |
|
実装者支援 |
AP、SMP、検証サービス、ERP ベンダーが、同じ syntax binding に基づく検証ルールを共有できる。 |
|
解釈のばらつき低減 |
手作業で「許容される UBL 要素」を判断する必要が減る。 |
|
サービス品質向上 |
検証サービスごとの判定差異を減らし、エラー原因を説明しやすくなる。 |
|
仕様改善へのフィードバック |
サンプル、syntax binding、business rule の不整合を具体的に報告できる。 |
特に、今回のように、サンプルには存在するが syntax binding には定義されていない要素が検出された場合、仕様作成側は次の判断を明確にする必要がある。
1. サンプルが誤っているのか。
2. syntax binding が漏れているのか。
3. 例外的に許容するが、syntax binding には載せない設計なのか。
三つ目を採る場合でも、その方針は明示されるべきである。
13. 実装上の注意点
Basic Rule を機械生成する場合、いくつか注意点がある。
13.1. selectorの正規化
JP PINT syntax binding では、同じ UBL 要素が selector により異なる意味で使い分けられる。
たとえば、cac:AdditionalDocumentReference は、cbc:DocumentTypeCode = '130' の場合とそうでない場合で、異なる意味を持つ。
cbc:DocumentTypeCode = '130'
Invoiced object identifier
not(cbc:DocumentTypeCode = '130')
Additional supporting document
このため、Basic Rule 生成では、selector をそのまま親パスの一部として扱う必要がある。
13.2. normalize-spaceを使わない方針
今回のスクリプトでは、コード値の比較に normalize-space(.) は使用しない。
Basic Rule は、構造と selector の厳格な適用を目的とするためである。
たとえば、次のような値は、厳格には SEPA と同一ではない。
<cbc:ID schemeID=" SEPA">123456789</cbc:ID>
この場合、次の selector には一致しない。
cbc:ID/@schemeID = 'SEPA'
一方、normalize-space(.) を使うと、前後の空白が除去されるため、次の selector には一致してしまう。
cbc:ID/@schemeID[normalize-space(.) = 'SEPA']
しかし、schemeID はコード値であり、余分な空白を含む値を同一視して受け入れるべきかどうかは、Basic Rule の役割ではない。
同様に、次のような VAT の前後に空白を含む値も、厳格には VAT と同一ではない。
<cac:TaxScheme>
<cbc:ID> VAT </cbc:ID>
</cac:TaxScheme>
この場合、次の selector には一致しない。
cac:TaxScheme/cbc:ID = 'VAT'
これは、Basic Rule としては意図した挙動である。Basic Rule は、syntax binding に定義された selector 条件を厳格に適用し、構造上どのグループに属するかを判定するためのものである。
このような値の正当性は、Basic Rule で緩く吸収するのではなく、コードリスト検証や値検証で扱うべきである。
したがって、今回のスクリプトでは、次のような selector は元の比較式を維持している。
cbc:ID/@schemeID = 'SEPA'
cbc:ID/@schemeID != 'SEPA'
cac:TaxScheme/cbc:ID = 'VAT'
cac:TaxScheme/cbc:ID != 'VAT'
ただし、cbc:DocumentTypeCode != '130' については例外的に扱っている。
cbc:DocumentTypeCode が存在しない cac:AdditionalDocumentReference も additional supporting document として扱う必要があるため、次のように変換している。
cbc:DocumentTypeCode != '130'
not(cbc:DocumentTypeCode = '130')
これにより、次の両方が additional supporting document 側として扱われる。
<cac:AdditionalDocumentReference>
<cbc:ID>DOC-001</cbc:ID>
<cac:Attachment>
...
</cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:AdditionalDocumentReference>
<cbc:ID>DOC-002</cbc:ID>
<cbc:DocumentTypeCode>916</cbc:DocumentTypeCode>
<cac:Attachment>
...
</cac:Attachment>
</cac:AdditionalDocumentReference>
一方、次のように cbc:DocumentTypeCode が 130 の場合は、invoiced object identifier 側として扱われる。
<cac:AdditionalDocumentReference>
<cbc:ID>OBJ-001</cbc:ID>
<cbc:DocumentTypeCode>130</cbc:DocumentTypeCode>
</cac:AdditionalDocumentReference>
13.3. allow-shadow方式とwhitelist方式
Schematron の仕様上、同じ pattern 内で、より具体的な rule と fallback rule を組み合わせることは可能である。
しかし、処理系によっては、空 rule による shadowing が期待どおりに動かない場合がある。
そのため、実運用では、次の whitelist 方式の方が安定する可能性がある。
<sch:rule context="/ubl:Invoice/*">
<sch:assert test="
self::cbc:CustomizationID or
self::cbc:ProfileID or
self::cbc:ID or
self::cbc:IssueDate or
self::cac:AccountingSupplierParty or
self::cac:TaxTotal or
self::cac:InvoiceLine
">
Document MUST NOT contain elements under ubl:Invoice that are not part of the JP PINT data model.
</sch:assert>
</sch:rule>
14. 今後の改善提案
今回の結果から、JP PINT については、次の改善が望ましい。
| 項目 | 提案 |
|---|---|
|
Basic Ruleの整備 |
JP PINT syntax binding から Basic Model Rule を機械生成し、公式または準公式の検証ルールとして共有する。 |
|
サンプルとsyntax bindingの整合性確認 |
download resource に含まれる XML サンプルを、syntax binding 由来の Basic Rule で検証する。 |
|
IBT-192-1の追加検討 |
税会計通貨の tax breakdown に |
|
`cbc:UBLVersionID`の扱い明確化 |
サンプルに残すなら syntax binding または UBL-CR 相当 rule で明示する。不要ならサンプルから削除する。 |
|
EIPAでの共同開発 |
Basic Rule 生成スクリプト、検証結果、差分検出レポートを EIPA で共同整備し、AP や検証サービス間で共有する。 |
15. まとめ
JP PINT の syntax binding は、JP PINT data model と UBL XML syntax を結び付ける重要な定義である。
しかし、その syntax binding と公式サンプルが一致していない場合、実装者は、サンプルを信じるべきか、syntax binding を信じるべきか判断できなくなる。
今回の Basic Rule 生成スクリプトによる検証では、次の二つの不整合が明確になった。
1. 公式サンプルに cbc:UBLVersionID が含まれているが、syntax binding には定義されていない。
2. 公式サンプルの税会計通貨 Tax breakdown に cac:TaxScheme/cbc:ID が含まれているが、
syntax binding では対応する IBT-192-1 が定義されていない。
これらは、単なる実装上の細部ではなく、公開仕様パッケージの内部一貫性に関わる問題である。
サンプルを訂正するのか、syntax binding を訂正するのか、あるいは例外として明示するのかを、仕様として明確にする必要がある。
また、今回の結果は、Basic Rule を手作業で整備するのではなく、syntax binding から機械生成し、検証サービス間で共有することの重要性を示している。
JP PINT を安定した運用仕様として発展させるためには、syntax binding、Schematron、サンプル XML、Help Desk での説明が相互に整合していることが不可欠である。
16. 参考
-
[0] Japan PINT Invoice UBL Example2-TaxAcctCur.xml
<?xml version="1.0" encoding="UTF-8"?> <Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!-- Japan common commercial invoice, example2-Foreign Currency --> <cbc:UBLVersionID>2.1</cbc:UBLVersionID> <cbc:CustomizationID>urn:peppol:pint:billing-1@jp-1</cbc:CustomizationID> <!-- IBT-024 - Specification identifier --> <cbc:ProfileID>urn:peppol:bis:billing</cbc:ProfileID> <!-- IBT-023 - Business process type --> <cbc:ID>156</cbc:ID> <!-- IBT-001 - Invoice number --> <cbc:IssueDate>2023-10-24</cbc:IssueDate> <!-- IBT-002 - Invoice issue date --> <cbc:DueDate>2023-11-20</cbc:DueDate> <!-- IBT-009 - Payment due date --> <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode> <!-- IBT-003 - Invoice type code --> <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode> <!-- IBT-005 - Invoice currency code --> <cbc:TaxCurrencyCode>JPY</cbc:TaxCurrencyCode> <!-- IBT-006 - Tax accounting currency --> <cac:InvoicePeriod> <!-- IBG-14 - INVOICING PERIOD --> <cbc:StartDate>2023-10-18</cbc:StartDate> <!-- IBT-073 - Invoicing period start date --> <cbc:EndDate>2023-10-18</cbc:EndDate> <!-- IBT-074 - Invoicing period end date --> </cac:InvoicePeriod> <cac:AccountingSupplierParty> <!-- IBG-04 - SELLER --> <cac:Party> <cbc:EndpointID schemeID="0088">9482348239847239874</cbc:EndpointID> <!-- IBT-034 - Seller electronic address, IBT-034-1 - Scheme identifier --> <cac:PostalAddress> <!-- IBG-05 - SELLER POSTAL ADDRESS --> <cac:Country> <cbc:IdentificationCode>GB</cbc:IdentificationCode> <!-- IBT-040 - Seller country code --> </cac:Country> </cac:PostalAddress> <cac:PartyTaxScheme> <cbc:CompanyID>T1234567890123</cbc:CompanyID> <!-- IBT-031 - Seller TAX identifier --> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> <!-- IBT-031, qualifier --> </cac:TaxScheme> </cac:PartyTaxScheme> <cac:PartyLegalEntity> <cbc:RegistrationName>XYZ Digital Learning Services, Inc.</cbc:RegistrationName> <!-- IBT-027 - Seller name --> </cac:PartyLegalEntity> </cac:Party> </cac:AccountingSupplierParty> <cac:AccountingCustomerParty> <!-- IBG-07 - BUYER --> <cac:Party> <cbc:EndpointID schemeID="0188">3210987654321</cbc:EndpointID> <!-- IBT-049 - Buyer electronic address, IBT-049-1 - Scheme identifier --> <cac:PostalAddress> <!-- IBG-08 - BUYER POSTAL ADDRESS --> <cac:Country> <cbc:IdentificationCode>JP</cbc:IdentificationCode> <!-- IBT-055 - Buyer country code --> </cac:Country> </cac:PostalAddress> <cac:PartyLegalEntity> <cbc:RegistrationName>〇〇 Bussan Co., Ltd.</cbc:RegistrationName> <!-- IBT-044 - Buyer name --> </cac:PartyLegalEntity> </cac:Party> </cac:AccountingCustomerParty> <cac:TaxRepresentativeParty> <!-- IBG-11 - SELLER TAX REPRESENTATIVE PARTY --> <cac:PartyName> <cbc:Name>TaxRepresentative Name</cbc:Name> <!-- IBT-062 - Seller tax representative name --> </cac:PartyName> <cac:PostalAddress> <!-- IBG-12 - SELLER TAX REPRESENTATIVE POSTAL ADDRESS --> <cac:Country> <cbc:IdentificationCode>JP</cbc:IdentificationCode> <!-- IBT-069 - Tax representative country code --> </cac:Country> </cac:PostalAddress> <cac:PartyTaxScheme> <cbc:CompanyID>T7654321098765</cbc:CompanyID> <!-- IBT-063 - Seller tax representative TAX identifier --> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> <!-- IBT-063, qualifier --> </cac:TaxScheme> </cac:PartyTaxScheme> </cac:TaxRepresentativeParty> <cac:PaymentMeans> <!-- IBG-16 - PAYMENT INSTRUCTIONS --> <cbc:PaymentMeansCode name="Credit card">54</cbc:PaymentMeansCode> <!-- IBT-081 - Payment means type code, IBT-082 Payment means text --> <cbc:PaymentID>9387439</cbc:PaymentID> <!-- IBT-083 Remittance information --> <cac:CardAccount> <!-- IBG-18 PAYMENT CARD INFORMATION --> <cbc:PrimaryAccountNumberID>123236</cbc:PrimaryAccountNumberID> <!-- IBT-087 Payment card primary account number --> <cbc:NetworkID>VISA</cbc:NetworkID> <cbc:HolderName>Card holders name</cbc:HolderName> <!-- IBT-088 Payment card holder name --> </cac:CardAccount> </cac:PaymentMeans> <cac:TaxTotal> <cbc:TaxAmount currencyID="EUR">250</cbc:TaxAmount> <!-- IBT-110 - Invoice total TAX amount --> <cac:TaxSubtotal> <!-- IBG-23 - TAX BREAKDOWN --> <cbc:TaxableAmount currencyID="EUR">2500</cbc:TaxableAmount> <!-- IBT-116 - TAX category taxable amount --> <cbc:TaxAmount currencyID="EUR">250</cbc:TaxAmount> <!-- IBT-117 - TAX category tax amount --> <cac:TaxCategory> <cbc:ID>S</cbc:ID> <!-- IBT-118 - TAX category code --> <cbc:Percent>10</cbc:Percent> <!-- IBT-119 - TAX category rate --> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> <!-- IBT-118, qualifier --> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> </cac:TaxTotal> <cac:TaxTotal> <!-- IBG-37 - DOCUMENT TOTALS IN TAX ACCOUNTING CURRENCY --> <cbc:TaxAmount currencyID="JPY">32500</cbc:TaxAmount> <!-- IBT-111 - Invoice total TAX amount in tax accounting currency --> <cac:TaxSubtotal> <!-- IBG-38 - TAX BREAKDOWN IN ACCOUNTING CURRENCY --> <cbc:TaxAmount currencyID="JPY">32500</cbc:TaxAmount> <!-- IBT-190 - TAX category tax amount in accounting currency --> <cac:TaxCategory> <cbc:ID>S</cbc:ID> <!-- IBT-192 - TAX category code for tax category tax amount in accounting currency --> <cbc:Percent>10</cbc:Percent> <!-- IBT-193 - TAX category rate for tax category tax amount in accounting currency --> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> <!-- IBT-192, qualifier --> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> </cac:TaxTotal> <cac:LegalMonetaryTotal> <!-- IBG-22 - DOCUMENT TOTALS --> <cbc:LineExtensionAmount currencyID="EUR">2500</cbc:LineExtensionAmount> <!-- IBT-106 - Sum of Invoice line net amount --> <cbc:TaxExclusiveAmount currencyID="EUR">2500</cbc:TaxExclusiveAmount> <!-- IBT-109 - Invoice total amount without TAX --> <cbc:TaxInclusiveAmount currencyID="EUR">2750</cbc:TaxInclusiveAmount> <!-- IBT-112 - Invoice total amount with TAX --> <cbc:AllowanceTotalAmount currencyID="EUR">0</cbc:AllowanceTotalAmount> <!-- IBT-107 - Sum of allowances on document level --> <cbc:ChargeTotalAmount currencyID="EUR">0</cbc:ChargeTotalAmount> <!-- IBT-108 - Sum of charges on document level --> <cbc:PrepaidAmount currencyID="EUR">0</cbc:PrepaidAmount> <!-- IBT-113 - Paid amount --> <cbc:PayableRoundingAmount currencyID="EUR">0</cbc:PayableRoundingAmount> <!-- IBT-114 - Rounding amount --> <cbc:PayableAmount currencyID="EUR">2750</cbc:PayableAmount> <!-- IBT-115 - Amount due for payment --> </cac:LegalMonetaryTotal> <cac:InvoiceLine> <!-- IBG-25 - INVOICE LINE --> <cbc:ID>1</cbc:ID> <!-- IBT-126 - Invoice line identifier --> <cbc:InvoicedQuantity unitCode="H87">5</cbc:InvoicedQuantity> <!-- IBT-129 - Invoiced quantity, IBT-130 - Invoiced quantity unit of measure code --> <cbc:LineExtensionAmount currencyID="EUR">2500</cbc:LineExtensionAmount> <!-- IBT-131 - Invoice line net amount --> <cac:InvoicePeriod> <!-- IBG-26 - INVOICE LINE PERIOD --> <cbc:StartDate>2023-10-18</cbc:StartDate> <!-- IBT-134 - Invoice line period start date --> <cbc:EndDate>2023-10-18</cbc:EndDate> <!-- IBT-135 - Invoice line period end date --> </cac:InvoicePeriod> <cac:OrderLineReference> <cbc:LineID>1</cbc:LineID> <!-- IBT-132 - Referenced purchase order line reference --> <cac:OrderReference> <cbc:ID>OR-123</cbc:ID> <!-- IBT-183 - Purchase order reference --> </cac:OrderReference> </cac:OrderLineReference> <cac:Item> <!-- IBG-31 - ITEM INFORMATION --> <cbc:Name>1-day online lecture course</cbc:Name> <!-- IBT-153 - Item name --> <cac:OriginCountry> <cbc:IdentificationCode>BE</cbc:IdentificationCode> <!-- IBT-159 - Item country of origin --> </cac:OriginCountry> <cac:ClassifiedTaxCategory> <!-- IBG-30 - LINE TAX INFORMATION --> <cbc:ID>S</cbc:ID> <!-- IBT-151 - Invoiced item TAX category code --> <cbc:Percent>10</cbc:Percent> <!-- IBT-152 - Invoiced item TAX rate --> <!-- cbc:PerUnitAmount, IBT-166 - Unit TAX --> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> <!-- IBT-167 - Tax Scheme --> </cac:TaxScheme> </cac:ClassifiedTaxCategory> </cac:Item> <cac:Price> <!-- IBG-29 - PRICE DETAILS --> <cbc:PriceAmount currencyID="EUR">500</cbc:PriceAmount> <!-- IBT-146 - Item net price --> <cbc:BaseQuantity unitCode="H87">1</cbc:BaseQuantity> <!-- IBT-149 - Item price base quantity, IBT-150 - Item price base quantity unit of measure code --> </cac:Price> </cac:InvoiceLine> </Invoice> -
[1] jp_pint_basic_rule_generator.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Generate JP PINT Basic Model Schematron from a syntax binding tree page. Input examples: URL: python jp_pint_basic_rule_generator.py \ https://www.sambuichi.jp/jp_pint/billing-japan/syntax2/ubl-invoice/tree/en/ \ -o jp-pint-basic-model.sch \ --report jp-pint-basic-model-report.txt URL with temporary SSL verification bypass: python jp_pint_basic_rule_generator.py \ https://www.sambuichi.jp/jp_pint/billing-japan/syntax2/ubl-invoice/tree/en/ \ -o jp-pint-basic-model.sch \ --report jp-pint-basic-model-report.txt \ --insecure Local HTML: python jp_pint_basic_rule_generator.py syntax-tree.html -o jp-pint-basic-model.sch Purpose: - Read a JP PINT syntax binding tree page whose rows contain paths such as: / Invoice / cac:AccountingSupplierParty / cac:Party / cbc:EndpointID / ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cbc:EndpointID / Invoice / cac:AdditionalDocumentReference [ cbc:DocumentTypeCode = '130' ] / cbc:ID / Invoice / cac:PartyIdentification [ cbc:ID / @schemeID != 'SEPA' ] / cbc:ID / Invoice / cac:PartyTaxScheme [ cac:TaxScheme / cbc:ID = 'VAT' ] / cbc:CompanyID / Invoice / ... / cbc:ID / @schemeID - Normalise root path: / Invoice -> /ubl:Invoice / ubl:Invoice -> /ubl:Invoice - Normalise only the special DocumentTypeCode != '130' selector: [cbc:DocumentTypeCode = '130'] -> [cbc:DocumentTypeCode = '130'] [cbc:DocumentTypeCode != '130'] -> [not(cbc:DocumentTypeCode = '130')] [cbc:ID/@schemeID = 'SEPA'] -> [cbc:ID/@schemeID = 'SEPA'] [cbc:ID/@schemeID != 'SEPA'] -> [cbc:ID/@schemeID != 'SEPA'] [cac:TaxScheme/cbc:ID = 'VAT'] -> [cac:TaxScheme/cbc:ID = 'VAT'] [cac:TaxScheme/cbc:ID != 'VAT'] -> [cac:TaxScheme/cbc:ID != 'VAT'] - Build an allowed-child list for each parent element path. - Generate Basic Model Schematron rules to detect elements and attributes not defined in the JP PINT syntax binding. Default output style: - "allow-shadow" mode: Generate one empty rule for each allowed child and then a fallback rule: <sch:rule context="parent/allowed-child"/> <sch:rule context="parent/*"> <sch:assert test="false()">...</sch:assert> </sch:rule> Recommended for tools where empty-rule shadowing is unstable: - "whitelist" mode: Generate one rule on parent/* with: self::allowed1 or self::allowed2 ... This is usually more robust with generic Schematron validators. Examples: python jp_pint_basic_rule_generator.py syntax-tree.html \ -o jp-pint-basic-model.sch \ --mode whitelist Notes: - This is a generator draft. Review the generated Schematron before using it for conformance testing. - The script preserves selector predicates found in the syntax binding path. - The generated rule IDs use PINT-JP-BM-* by default. Licensed under the MIT License. Copyright (c) 2026 SAMBUICHI, Nobuyuki (Sambuichi Professional Engineers Office) """ from __future__ import annotations import argparse import html import re import ssl import sys import urllib.request from collections import defaultdict from dataclasses import dataclass from pathlib import Path from typing import DefaultDict, Iterable, List, Sequence, Set, Tuple NS = { "ubl": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2", "cac": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2", "cbc": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", } # The first cardinality token normally marks the end of the path text. CARDINALITY_RE = re.compile( r"\s(?:0|1)\.\.(?:0|1|n)\b|\s0\b" ) # Accept both "/ Invoice ..." and "/ ubl:Invoice ...". PATH_LINE_RE = re.compile(r"^\s*/\s*(?:ubl:)?Invoice\b") @dataclass(frozen=True) class ParsedPath: """A parsed syntax binding path.""" original: str parts: Tuple[str, ...] is_attribute: bool @property def xpath(self) -> str: return "/" + "/".join(self.parts) @property def parent_xpath(self) -> str: if self.is_attribute: return "/" + "/".join(self.parts[:-1]) if len(self.parts) <= 1: return "" return "/" + "/".join(self.parts[:-1]) @property def last_part(self) -> str: return self.parts[-1] def read_source(source: str, *, insecure: bool = False, ca_file: str | None = None) -> str: """Read HTML from a URL or local file. On macOS python.org installations, urllib may fail with: SSL: CERTIFICATE_VERIFY_FAILED Preferred fixes: 1. Run "Install Certificates.command" for your Python installation. 2. Use --ca-file with a trusted CA bundle. Temporary workaround: --insecure disables HTTPS certificate verification. Use it only for trusted sources under your control. """ if re.match(r"^https?://", source, flags=re.I): req = urllib.request.Request( source, headers={ "User-Agent": ( "Mozilla/5.0 (compatible; JP-PINT-BasicRuleGenerator/0.2)" ) }, ) context = None if insecure: context = ssl._create_unverified_context() elif ca_file: context = ssl.create_default_context(cafile=ca_file) with urllib.request.urlopen(req, timeout=30, context=context) as response: charset = response.headers.get_content_charset() or "utf-8" return response.read().decode(charset, errors="replace") return Path(source).read_text(encoding="utf-8", errors="replace") def html_to_candidate_lines(raw_html: str) -> List[str]: """Convert HTML to candidate text lines. Prefer table rows when BeautifulSoup is available, but keep a standard-library fallback so the script can run without additional packages. """ rows: List[str] = [] try: from bs4 import BeautifulSoup # type: ignore soup = BeautifulSoup(raw_html, "html.parser") # Table/list row extraction. for tag_name in ("tr", "li", "p", "div"): for tag in soup.find_all(tag_name): text = tag.get_text(" ", strip=True) if text: rows.append(text) # Full text fallback as well; useful for pages that are not table-based. rows.extend(soup.get_text("\n").splitlines()) except Exception: # Standard library fallback: turn closing row/block tags into newlines. text = raw_html text = re.sub(r"(?is)<script.*?</script>", "\n", text) text = re.sub(r"(?is)<style.*?</style>", "\n", text) text = re.sub(r"(?i)</(?:tr|li|p|div|h[1-6])\s*>", "\n", text) text = re.sub(r"(?i)<br\s*/?>", "\n", text) text = re.sub(r"(?s)<[^>]+>", " ", text) rows.extend(text.splitlines()) cleaned = [] seen = set() for row in rows: row = clean_text(row) if row and row not in seen: seen.add(row) cleaned.append(row) return cleaned def clean_text(text: str) -> str: """Normalise HTML text for regex parsing.""" text = html.unescape(text) text = text.replace("\u00a0", " ") text = text.replace(" ", " ") text = re.sub(r"\s+", " ", text).strip() return text def extract_path_text(line: str) -> str | None: """Extract the path part from a syntax binding row. A row normally starts with: / Invoice / cac:Something / cbc:ID 1..1 0..1 ibt-... / ubl:Invoice / cac:Something / cbc:ID 1..1 0..1 ibt-... The first cardinality token marks the end of the path. """ if not PATH_LINE_RE.match(line): return None match = CARDINALITY_RE.search(line) if not match: # Root row may be: / Invoice 1..1 ... # If the page does not show cardinality after the root, ignore it. return None path_text = line[: match.start()].strip() return path_text if path_text.startswith("/") else None def split_path_outside_predicates(path_text: str) -> List[str]: """Split /-separated path segments, ignoring / inside [predicates].""" s = path_text.strip() if s.startswith("/"): s = s[1:] if s.endswith("/"): s = s[:-1] parts: List[str] = [] current: List[str] = [] depth = 0 for ch in s: if ch == "[": depth += 1 current.append(ch) elif ch == "]": depth = max(0, depth - 1) current.append(ch) elif ch == "/" and depth == 0: part = clean_path_part("".join(current)) if part: parts.append(part) current = [] else: current.append(ch) part = clean_path_part("".join(current)) if part: parts.append(part) return parts def normalise_selector_predicates(text: str) -> str: """Normalise only the special DocumentTypeCode != '130' selector. Policy: - Keep ordinary '=' and '!=' selectors unchanged. Examples: [cbc:ID/@schemeID = 'SEPA'] [cbc:ID/@schemeID != 'SEPA'] [cac:TaxScheme/cbc:ID = 'VAT'] [cac:TaxScheme/cbc:ID != 'VAT'] - Convert only this special selector: [cbc:DocumentTypeCode != '130'] to: [not(cbc:DocumentTypeCode = '130')] Reason: For AdditionalDocumentReference, absence of cbc:DocumentTypeCode should be treated as the supporting-document case. Therefore, the negated selector should also match when cbc:DocumentTypeCode is not present. """ text = re.sub(r"\s+", " ", text).strip() # Normalise spaces around "/" so that "cbc:ID / @schemeID" becomes # "cbc:ID/@schemeID". This does not change the comparison semantics. text = re.sub(r"\s*/\s*", "/", text) # Normalise the invoice root if it appears inside a selector. text = re.sub(r"/\s*(?:ubl:)?Invoice\b", "/ubl:Invoice", text) # Convert only: # [cbc:DocumentTypeCode != '130'] # to: # [not(cbc:DocumentTypeCode = '130')] text = re.sub( r"\[\s*cbc:DocumentTypeCode\s*!=\s*(['\"])(130)\1\s*\]", r"[not(cbc:DocumentTypeCode = '\2')]", text, ) # Also canonicalise the equivalent explicit form if it appears with spaces. text = re.sub( r"\[\s*not\(\s*cbc:DocumentTypeCode\s*=\s*(['\"])(130)\1\s*\)\s*\]", r"[not(cbc:DocumentTypeCode = '\2')]", text, ) # # If the source or an older generated tree already contains the previous # # normalize-space form, canonicalise it here without using a separate # # denormalise helper. # text = re.sub( # r"cbc:DocumentTypeCode\[\s*normalize-space\(\.\)\s*=\s*(['\"])(130)\1\s*\]", # r"cbc:DocumentTypeCode = '\2'", # text, # ) # text = re.sub( # r"not\(\s*cbc:DocumentTypeCode\[\s*normalize-space\(\.\)\s*=\s*(['\"])(130)\1\s*\]\s*\)", # r"not(cbc:DocumentTypeCode = '\2')", # text, # ) return text def normalise_path_to_path_selectors(text: str) -> str: """Normalise common JP PINT path-to-path selector expressions. The official syntax binding may show expressions such as: [cac:TaxTotal/TaxAmount/@currency = cbc:DocumentCurrencyCode] In the generated context this should be a predicate on cac:TaxTotal: [cbc:TaxAmount/@currencyID = /ubl:Invoice/cbc:DocumentCurrencyCode] This function assumes it receives a single path segment after slash splitting, for example: cac:TaxTotal[cac:TaxTotal/TaxAmount/@currency = cbc:DocumentCurrencyCode] cac:TaxTotal[cbc:TaxAmount/@currencyID = /ubl:Invoice/cbc:DocumentCurrencyCode] """ text = re.sub(r"\s+", " ", text).strip() text = re.sub(r"\s*/\s*", "/", text) text = re.sub(r"/\s*(?:ubl:)?Invoice\b", "/ubl:Invoice", text) # Fix TaxAmount namespace and currency attribute spelling. # # Do NOT use simple str.replace("TaxAmount/@currency", ...) # because it also matches inside an already normalised # "cbc:TaxAmount/@currencyID" and can create: # cbc:cbc:TaxAmount/@currencyID # # Cases handled: # TaxAmount/@currency -> cbc:TaxAmount/@currencyID # TaxAmount/@currencyID -> cbc:TaxAmount/@currencyID # cbc:TaxAmount/@currency -> cbc:TaxAmount/@currencyID # Already correct: # cbc:TaxAmount/@currencyID text = re.sub( r"(?<!:)\bTaxAmount/@currency(?!ID)\b", "cbc:TaxAmount/@currencyID", text, ) text = re.sub( r"(?<!:)\bTaxAmount/@currencyID\b", "cbc:TaxAmount/@currencyID", text, ) text = re.sub( r"\bcbc:TaxAmount/@currency(?!ID)\b", "cbc:TaxAmount/@currencyID", text, ) # Remove repeated outer cac:TaxTotal/ inside its own predicate. # Example: # cac:TaxTotal[cac:TaxTotal/cbc:TaxAmount/@currencyID = ...] # becomes: # cac:TaxTotal[cbc:TaxAmount/@currencyID = ...] text = re.sub( r"cac:TaxTotal\[\s*cac:TaxTotal/", "cac:TaxTotal[", text, ) # Document-level currency codes are children of /ubl:Invoice. text = re.sub( r"=\s*cbc:DocumentCurrencyCode\b", "= /ubl:Invoice/cbc:DocumentCurrencyCode", text, ) text = re.sub( r"=\s*cbc:TaxCurrencyCode\b", "= /ubl:Invoice/cbc:TaxCurrencyCode", text, ) # Whitespace cleanup around = inside predicates. # Whitespace cleanup around standalone "=" inside predicates. # Do not break "!=" into "! =". text = re.sub(r"(?<![!<>=])\s*=\s*(?!=)", " = ", text) text = re.sub(r"\[\s+", "[", text) text = re.sub(r"\s+\]", "]", text) return text def clean_path_part(part: str) -> str: """Normalise one path segment. Examples: "Invoice" -> "ubl:Invoice" "ubl:Invoice" -> "ubl:Invoice" "cac:AdditionalDocumentReference [ cbc:DocumentTypeCode = '130' ]" -> "cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']" "cac:AdditionalDocumentReference [ cbc:DocumentTypeCode != '130' ]" -> "cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]" "cac:TaxTotal [ cac:TaxTotal / TaxAmount / @currency = cbc:TaxCurrencyCode ]" -> "cac:TaxTotal[cbc:TaxAmount/@currencyID = /ubl:Invoice/cbc:TaxCurrencyCode]" """ part = clean_text(part) part = re.sub(r"\s+\[", "[", part) part = re.sub(r"\[\s+", "[", part) part = re.sub(r"\s+\]", "]", part) # Normalise root element. if part in ("Invoice", "ubl:Invoice"): return "ubl:Invoice" # Normalise selector syntax. part = normalise_path_to_path_selectors(part) part = normalise_selector_predicates(part) return part def normalise_xpath_context(context: str) -> str: """Normalise selector predicates in a full XPath context. This is a final safety pass used before storing or emitting contexts. It handles cases where a selector remained in the older syntax-binding form, for example: /ubl:Invoice/.../cac:PartyIdentification[cbc:ID/@schemeID != 'SEPA']/cbc:ID becomes: /ubl:Invoice/.../cac:PartyIdentification[cbc:ID/@schemeID != 'SEPA']/cbc:ID It also preserves strict selectors such as: [cbc:ID/@schemeID = 'SEPA'] [cbc:ID/@schemeID != 'SEPA'] [cac:TaxScheme/cbc:ID = 'VAT'] [cac:TaxScheme/cbc:ID != 'VAT'] """ if not context: return context parts = split_path_outside_predicates(context) if not parts: return context # split_path_outside_predicates already applies clean_path_part() to each # segment. Ensure the root is normalised as a final guard. if parts[0] in ("Invoice", "ubl:Invoice"): parts[0] = "ubl:Invoice" return "/" + "/".join(parts) def parse_path(path_text: str) -> ParsedPath | None: parts = tuple(split_path_outside_predicates(path_text)) if not parts: return None if parts[0] != "ubl:Invoice": return None is_attribute = parts[-1].startswith("@") return ParsedPath(original=path_text, parts=parts, is_attribute=is_attribute) def collect_paths(lines: Iterable[str]) -> List[ParsedPath]: parsed: List[ParsedPath] = [] seen = set() for line in lines: path_text = extract_path_text(line) if not path_text: continue pp = parse_path(path_text) if not pp: continue if pp.xpath not in seen: seen.add(pp.xpath) parsed.append(pp) return parsed def build_model( parsed_paths: Sequence[ParsedPath], ) -> Tuple[DefaultDict[str, Set[str]], DefaultDict[str, Set[str]], Set[str]]: """Return: allowed_children[parent_xpath] -> child segment strings allowed_attributes[element_xpath] -> attribute local names all_element_paths -> all element paths """ allowed_children: DefaultDict[str, Set[str]] = defaultdict(set) allowed_attributes: DefaultDict[str, Set[str]] = defaultdict(set) all_element_paths: Set[str] = set() for pp in parsed_paths: if pp.is_attribute: parent = normalise_xpath_context(pp.parent_xpath) attr_name = pp.last_part[1:] if parent: allowed_attributes[parent].add(attr_name) all_element_paths.add(parent) continue xpath = normalise_xpath_context(pp.xpath) parent = normalise_xpath_context(pp.parent_xpath) last_part = clean_path_part(pp.last_part) all_element_paths.add(xpath) if parent: allowed_children[parent].add(last_part) return allowed_children, allowed_attributes, all_element_paths def escape_xml(text: str) -> str: return ( text.replace("&", "&") .replace("<", "<") .replace(">", ">") .replace('"', """) ) def sort_paths(paths: Iterable[str]) -> List[str]: """Sort XPath contexts by depth then lexical value.""" return sorted(paths, key=lambda p: (p.count("/"), p)) def rule_id(prefix: str, number: int) -> str: return f"{prefix}-{number:04d}" def child_self_test(child: str) -> str: """Create a self::* test for a child path segment. Examples: cbc:ID -> self::cbc:ID cac:AdditionalDocumentReference[cbc:DocumentTypeCode[...]] -> self::cac:AdditionalDocumentReference[cbc:DocumentTypeCode[...]] """ return f"self::{child}" def wrap_long_xpath_or(tests: Sequence[str], indent: str = " ") -> str: """Join XPath tests with 'or', one test per line for readability.""" if not tests: return "false()" lines: List[str] = [] for i, test in enumerate(tests): suffix = " or" if i < len(tests) - 1 else "" lines.append(f"{indent}{test}{suffix}") return "\n".join(lines) def append_attribute_pattern( lines: List[str], allowed_attributes: DefaultDict[str, Set[str]], *, prefix: str, flag: str, ) -> None: """Append attribute whitelist pattern to a Schematron output list.""" if not allowed_attributes: return lines.append("") lines.append(' <sch:pattern id="PINT-JP-BASIC-MODEL-ATTRIBUTES">') a = 1 for raw_element in sort_paths(allowed_attributes.keys()): element = normalise_xpath_context(raw_element) attrs = sorted(allowed_attributes[raw_element]) # For attributes, use a single rule on the element and check unknown # attributes explicitly. This is more stable than empty attribute rules. attr_test = " and ".join( f"local-name() != '{attr}'" for attr in attrs ) test = f"not(@*[{attr_test}])" if attrs else "not(@*)" rid = f"{prefix}-A{a:04d}" a += 1 lines.append("") lines.append( f" <!-- Allowed attributes of {escape_xml(element)}: " f"{', '.join('@' + x for x in attrs)} -->" ) lines.append(f' <sch:rule context="{escape_xml(element)}">') lines.append( f' <sch:assert id="{rid}" flag="{flag}" ' f'test="{escape_xml(test)}">' ) lines.append( f" [{rid}]-Element '{escape_xml(element)}' MUST NOT " f"contain attributes other than " f"{escape_xml(', '.join('@' + x for x in attrs))}." ) lines.append(" </sch:assert>") lines.append(" </sch:rule>") lines.append("") lines.append(" </sch:pattern>") def schematron_header(title: str) -> List[str]: lines: List[str] = [] lines.append('<!--') lines.append(' Licensed under the MIT License.') lines.append(' Copyright (c) 2026 SAMBUICHI, Nobuyuki') lines.append(' (Sambuichi Professional Engineers Office)') lines.append('-->') lines.append('<?xml version="1.0" encoding="UTF-8"?>') lines.append( '<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" ' 'queryBinding="xslt2">' ) lines.append(f" <sch:title>{escape_xml(title)}</sch:title>") for pfx, uri in NS.items(): lines.append(f' <sch:ns prefix="{pfx}" uri="{uri}"/>') return lines def append_root_pattern(lines: List[str], *, prefix: str, flag: str) -> None: lines.append("") lines.append(' <sch:pattern id="PINT-JP-BASIC-ROOT">') lines.append(' <sch:rule context="/*">') lines.append( f' <sch:assert id="{prefix}-ROOT" flag="{flag}" ' 'test="self::ubl:Invoice">' ) lines.append( " [PINT-JP-BM-ROOT]-Document root element MUST be ubl:Invoice " "for JP PINT Invoice." ) lines.append(" </sch:assert>") lines.append(" </sch:rule>") lines.append(" </sch:pattern>") def generate_schematron_allow_shadow( allowed_children: DefaultDict[str, Set[str]], allowed_attributes: DefaultDict[str, Set[str]], *, prefix: str, title: str, flag: str, ) -> str: """Generate Schematron using empty allowed-child rules plus fallback rules.""" lines = schematron_header(title) append_root_pattern(lines, prefix=prefix, flag=flag) lines.append("") lines.append(' <sch:pattern id="PINT-JP-BASIC-MODEL-ELEMENTS">') n = 1 for parent in sort_paths(allowed_children.keys()): children = sorted(allowed_children[parent]) lines.append("") lines.append(f" <!-- Allowed children of {escape_xml(parent)} -->") for child in children: context = normalise_xpath_context(f"{parent}/{child}") lines.append(f' <sch:rule context="{escape_xml(context)}"/>') rid = rule_id(prefix, n) n += 1 parent = normalise_xpath_context(parent) fallback_context = f"{parent}/*" lines.append(f' <sch:rule context="{escape_xml(fallback_context)}">') lines.append( f' <sch:assert id="{rid}" flag="{flag}" test="false()">' ) lines.append( f" [{rid}]-Element " f"'{escape_xml(parent)}' MUST NOT contain child elements " "that are not part of the JP PINT data model." ) lines.append(" </sch:assert>") lines.append(" </sch:rule>") lines.append("") lines.append(" </sch:pattern>") append_attribute_pattern(lines, allowed_attributes, prefix=prefix, flag=flag) lines.append("") lines.append("</sch:schema>") lines.append("") return "\n".join(lines) def generate_schematron_whitelist( allowed_children: DefaultDict[str, Set[str]], allowed_attributes: DefaultDict[str, Set[str]], *, prefix: str, title: str, flag: str, ) -> str: """Generate Schematron using explicit whitelist asserts on parent/*. This mode is more robust in validators that do not reliably use empty rules to shadow a later wildcard fallback rule. """ lines = schematron_header(title) append_root_pattern(lines, prefix=prefix, flag=flag) lines.append("") lines.append(' <sch:pattern id="PINT-JP-BASIC-MODEL-ELEMENTS">') n = 1 for parent in sort_paths(allowed_children.keys()): parent = normalise_xpath_context(parent) children = sorted(clean_path_part(child) for child in allowed_children[parent]) tests = [child_self_test(child) for child in children] rid = rule_id(prefix, n) n += 1 lines.append("") lines.append(f" <!-- Allowed children of {escape_xml(parent)} -->") for child in children: lines.append(f" <!-- {escape_xml(child)} -->") context = f"{parent}/*" test = wrap_long_xpath_or(tests) lines.append(f' <sch:rule context="{escape_xml(context)}">') lines.append(f' <sch:assert id="{rid}" flag="{flag}" test="') lines.append(escape_xml(test)) lines.append(' ">') lines.append( f" [{rid}]-Element " f"'{escape_xml(parent)}' MUST NOT contain child elements " "that are not part of the JP PINT data model." ) lines.append(" </sch:assert>") lines.append(" </sch:rule>") lines.append("") lines.append(" </sch:pattern>") append_attribute_pattern(lines, allowed_attributes, prefix=prefix, flag=flag) lines.append("") lines.append("</sch:schema>") lines.append("") return "\n".join(lines) def generate_schematron( allowed_children: DefaultDict[str, Set[str]], allowed_attributes: DefaultDict[str, Set[str]], *, prefix: str = "PINT-JP-BM", title: str = "Generated JP PINT Basic Model Rules", flag: str = "fatal", mode: str = "allow-shadow", ) -> str: """Generate Schematron in the selected mode.""" if mode == "whitelist": return generate_schematron_whitelist( allowed_children, allowed_attributes, prefix=prefix, title=title, flag=flag, ) return generate_schematron_allow_shadow( allowed_children, allowed_attributes, prefix=prefix, title=title, flag=flag, ) def generate_report(parsed_paths: Sequence[ParsedPath]) -> str: element_count = sum(1 for p in parsed_paths if not p.is_attribute) attribute_count = sum(1 for p in parsed_paths if p.is_attribute) out = [ "JP PINT syntax binding extraction report", "========================================", f"Total paths: {len(parsed_paths)}", f"Element paths: {element_count}", f"Attribute paths: {attribute_count}", "", "Sample paths:", ] for p in parsed_paths[:40]: out.append(f" - {p.xpath}") return "\n".join(out) + "\n" def main(argv: Sequence[str] | None = None) -> int: parser = argparse.ArgumentParser( description=( "Generate Basic Model Schematron fallback rules from a JP PINT " "syntax binding tree page." ) ) parser.add_argument( "source", help="Syntax binding tree page URL or local HTML file.", ) parser.add_argument( "-o", "--output", default="jp-pint-basic-model.sch", help="Output Schematron file path. Default: jp-pint-basic-model.sch", ) parser.add_argument( "--prefix", default="PINT-JP-BM", help="Rule ID prefix. Default: PINT-JP-BM", ) parser.add_argument( "--flag", default="fatal", choices=["fatal", "warning"], help="Schematron flag for generated fallback rules. Default: fatal", ) parser.add_argument( "--mode", default="allow-shadow", choices=["allow-shadow", "whitelist"], help=( "Generation mode. " "'allow-shadow' creates empty allowed-child rules plus fallback rules. " "'whitelist' creates explicit self::... whitelist asserts. " "Default: allow-shadow." ), ) parser.add_argument( "--report", default=None, help="Optional report output path.", ) parser.add_argument( "--insecure", action="store_true", help=( "Disable HTTPS certificate verification. Use only for trusted " "sources under your control." ), ) parser.add_argument( "--ca-file", default=None, help="Path to a CA bundle file used for HTTPS certificate verification.", ) args = parser.parse_args(argv) raw_html = read_source(args.source, insecure=args.insecure, ca_file=args.ca_file) lines = html_to_candidate_lines(raw_html) parsed = collect_paths(lines) if not parsed: print( "No syntax binding paths were extracted. " "Check that the source page contains '/ Invoice / ...' or " "'/ ubl:Invoice / ...' rows.", file=sys.stderr, ) return 2 allowed_children, allowed_attributes, _ = build_model(parsed) sch = generate_schematron( allowed_children, allowed_attributes, prefix=args.prefix, flag=args.flag, mode=args.mode, ) Path(args.output).write_text(sch, encoding="utf-8") if args.report: Path(args.report).write_text(generate_report(parsed), encoding="utf-8") print(f"Extracted paths: {len(parsed)}") print(f"Parent element contexts: {len(allowed_children)}") print(f"Attribute contexts: {len(allowed_attributes)}") print(f"Mode: {args.mode}") print(f"Wrote: {args.output}") if args.report: print(f"Wrote: {args.report}") return 0 if __name__ == "__main__": raise SystemExit(main()) -
<!-- Licensed under the MIT License. Copyright (c) 2026 SAMBUICHI, Nobuyuki (Sambuichi Professional Engineers Office) --> <?xml version="1.0" encoding="UTF-8"?> <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"> <sch:title>Generated JP PINT Basic Model Rules</sch:title> <sch:ns prefix="ubl" uri="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"/> <sch:ns prefix="cac" uri="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"/> <sch:ns prefix="cbc" uri="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"/> <sch:pattern id="PINT-JP-BASIC-ROOT"> <sch:rule context="/*"> <sch:assert id="PINT-JP-BM-ROOT" flag="fatal" test="self::ubl:Invoice"> [PINT-JP-BM-ROOT]-Document root element MUST be ubl:Invoice for JP PINT Invoice. </sch:assert> </sch:rule> </sch:pattern> <sch:pattern id="PINT-JP-BASIC-MODEL-ELEMENTS"> <!-- Allowed children of /ubl:Invoice --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty"/> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']"/> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]"/> <sch:rule context="/ubl:Invoice/cac:BillingReference"/> <sch:rule context="/ubl:Invoice/cac:ContractDocumentReference"/> <sch:rule context="/ubl:Invoice/cac:Delivery"/> <sch:rule context="/ubl:Invoice/cac:DespatchDocumentReference"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine"/> <sch:rule context="/ubl:Invoice/cac:InvoicePeriod"/> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal"/> <sch:rule context="/ubl:Invoice/cac:OrderReference"/> <sch:rule context="/ubl:Invoice/cac:OriginatorDocumentReference"/> <sch:rule context="/ubl:Invoice/cac:PayeeParty"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans"/> <sch:rule context="/ubl:Invoice/cac:PaymentTerms"/> <sch:rule context="/ubl:Invoice/cac:PrepaidPayment"/> <sch:rule context="/ubl:Invoice/cac:ProjectReference"/> <sch:rule context="/ubl:Invoice/cac:ReceiptDocumentReference"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]"/> <sch:rule context="/ubl:Invoice/cbc:AccountingCost"/> <sch:rule context="/ubl:Invoice/cbc:BuyerReference"/> <sch:rule context="/ubl:Invoice/cbc:CustomizationID"/> <sch:rule context="/ubl:Invoice/cbc:DocumentCurrencyCode"/> <sch:rule context="/ubl:Invoice/cbc:DueDate"/> <sch:rule context="/ubl:Invoice/cbc:ID"/> <sch:rule context="/ubl:Invoice/cbc:InvoiceTypeCode"/> <sch:rule context="/ubl:Invoice/cbc:IssueDate"/> <sch:rule context="/ubl:Invoice/cbc:IssueTime"/> <sch:rule context="/ubl:Invoice/cbc:Note"/> <sch:rule context="/ubl:Invoice/cbc:ProfileID"/> <sch:rule context="/ubl:Invoice/cbc:TaxCurrencyCode"/> <sch:rule context="/ubl:Invoice/cbc:TaxPointDate"/> <sch:rule context="/ubl:Invoice/*"> <sch:assert id="PINT-JP-BM-0001" flag="fatal" test="false()"> [PINT-JP-BM-0001]-Element '/ubl:Invoice' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingCustomerParty --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/*"> <sch:assert id="PINT-JP-BM-0002" flag="fatal" test="false()"> [PINT-JP-BM-0002]-Element '/ubl:Invoice/cac:AccountingCustomerParty' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/*"> <sch:assert id="PINT-JP-BM-0003" flag="fatal" test="false()"> [PINT-JP-BM-0003]-Element '/ubl:Invoice/cac:AccountingSupplierParty' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130'] --> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:DocumentTypeCode"/> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/*"> <sch:assert id="PINT-JP-BM-0004" flag="fatal" test="false()"> [PINT-JP-BM-0004]-Element '/ubl:Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')] --> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment"/> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cbc:DocumentDescription"/> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/*"> <sch:assert id="PINT-JP-BM-0005" flag="fatal" test="false()"> [PINT-JP-BM-0005]-Element '/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()] --> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cac:TaxCategory"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:AllowanceChargeReason"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:AllowanceChargeReasonCode"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:ChargeIndicator"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:MultiplierFactorNumeric"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/*"> <sch:assert id="PINT-JP-BM-0006" flag="fatal" test="false()"> [PINT-JP-BM-0006]-Element '/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] --> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cac:TaxCategory"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:AllowanceChargeReason"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:AllowanceChargeReasonCode"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:Amount"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:BaseAmount"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:ChargeIndicator"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:MultiplierFactorNumeric"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/*"> <sch:assert id="PINT-JP-BM-0007" flag="fatal" test="false()"> [PINT-JP-BM-0007]-Element '/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:BillingReference --> <sch:rule context="/ubl:Invoice/cac:BillingReference/cac:InvoiceDocumentReference"/> <sch:rule context="/ubl:Invoice/cac:BillingReference/*"> <sch:assert id="PINT-JP-BM-0008" flag="fatal" test="false()"> [PINT-JP-BM-0008]-Element '/ubl:Invoice/cac:BillingReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:ContractDocumentReference --> <sch:rule context="/ubl:Invoice/cac:ContractDocumentReference/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:ContractDocumentReference/*"> <sch:assert id="PINT-JP-BM-0009" flag="fatal" test="false()"> [PINT-JP-BM-0009]-Element '/ubl:Invoice/cac:ContractDocumentReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:Delivery --> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryParty"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cbc:ActualDeliveryDate"/> <sch:rule context="/ubl:Invoice/cac:Delivery/*"> <sch:assert id="PINT-JP-BM-0010" flag="fatal" test="false()"> [PINT-JP-BM-0010]-Element '/ubl:Invoice/cac:Delivery' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:DespatchDocumentReference --> <sch:rule context="/ubl:Invoice/cac:DespatchDocumentReference/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:DespatchDocumentReference/*"> <sch:assert id="PINT-JP-BM-0011" flag="fatal" test="false()"> [PINT-JP-BM-0011]-Element '/ubl:Invoice/cac:DespatchDocumentReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DespatchLineReference"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[cbc:DocumentTypeCode = '130']"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[not(cbc:DocumentTypeCode = '130')]"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:InvoicePeriod"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:OrderLineReference"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cbc:AccountingCost"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cbc:InvoicedQuantity"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cbc:LineExtensionAmount"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cbc:Note"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/*"> <sch:assert id="PINT-JP-BM-0012" flag="fatal" test="false()"> [PINT-JP-BM-0012]-Element '/ubl:Invoice/cac:InvoiceLine' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoicePeriod --> <sch:rule context="/ubl:Invoice/cac:InvoicePeriod/cbc:DescriptionCode"/> <sch:rule context="/ubl:Invoice/cac:InvoicePeriod/cbc:EndDate"/> <sch:rule context="/ubl:Invoice/cac:InvoicePeriod/cbc:StartDate"/> <sch:rule context="/ubl:Invoice/cac:InvoicePeriod/*"> <sch:assert id="PINT-JP-BM-0013" flag="fatal" test="false()"> [PINT-JP-BM-0013]-Element '/ubl:Invoice/cac:InvoicePeriod' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:LegalMonetaryTotal --> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount"/> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:ChargeTotalAmount"/> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:LineExtensionAmount"/> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount"/> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableRoundingAmount"/> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PrepaidAmount"/> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount"/> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:TaxInclusiveAmount"/> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/*"> <sch:assert id="PINT-JP-BM-0014" flag="fatal" test="false()"> [PINT-JP-BM-0014]-Element '/ubl:Invoice/cac:LegalMonetaryTotal' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:OrderReference --> <sch:rule context="/ubl:Invoice/cac:OrderReference/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:OrderReference/cbc:SalesOrderID"/> <sch:rule context="/ubl:Invoice/cac:OrderReference/*"> <sch:assert id="PINT-JP-BM-0015" flag="fatal" test="false()"> [PINT-JP-BM-0015]-Element '/ubl:Invoice/cac:OrderReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:OriginatorDocumentReference --> <sch:rule context="/ubl:Invoice/cac:OriginatorDocumentReference/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:OriginatorDocumentReference/*"> <sch:assert id="PINT-JP-BM-0016" flag="fatal" test="false()"> [PINT-JP-BM-0016]-Element '/ubl:Invoice/cac:OriginatorDocumentReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PayeeParty --> <sch:rule context="/ubl:Invoice/cac:PayeeParty/cac:PartyIdentification"/> <sch:rule context="/ubl:Invoice/cac:PayeeParty/cac:PartyLegalEntity"/> <sch:rule context="/ubl:Invoice/cac:PayeeParty/cac:PartyName"/> <sch:rule context="/ubl:Invoice/cac:PayeeParty/*"> <sch:assert id="PINT-JP-BM-0017" flag="fatal" test="false()"> [PINT-JP-BM-0017]-Element '/ubl:Invoice/cac:PayeeParty' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PaymentMeans --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:CardAccount"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PaymentMandate"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cbc:PaymentID"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cbc:PaymentMeansCode"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/*"> <sch:assert id="PINT-JP-BM-0018" flag="fatal" test="false()"> [PINT-JP-BM-0018]-Element '/ubl:Invoice/cac:PaymentMeans' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PaymentTerms --> <sch:rule context="/ubl:Invoice/cac:PaymentTerms/cbc:Amount"/> <sch:rule context="/ubl:Invoice/cac:PaymentTerms/cbc:InstallmentDueDate"/> <sch:rule context="/ubl:Invoice/cac:PaymentTerms/cbc:Note"/> <sch:rule context="/ubl:Invoice/cac:PaymentTerms/cbc:PaymentMeansID"/> <sch:rule context="/ubl:Invoice/cac:PaymentTerms/*"> <sch:assert id="PINT-JP-BM-0019" flag="fatal" test="false()"> [PINT-JP-BM-0019]-Element '/ubl:Invoice/cac:PaymentTerms' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PrepaidPayment --> <sch:rule context="/ubl:Invoice/cac:PrepaidPayment/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:PrepaidPayment/cbc:InstructionID"/> <sch:rule context="/ubl:Invoice/cac:PrepaidPayment/cbc:PaidAmount"/> <sch:rule context="/ubl:Invoice/cac:PrepaidPayment/cbc:ReceivedDate"/> <sch:rule context="/ubl:Invoice/cac:PrepaidPayment/*"> <sch:assert id="PINT-JP-BM-0020" flag="fatal" test="false()"> [PINT-JP-BM-0020]-Element '/ubl:Invoice/cac:PrepaidPayment' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:ProjectReference --> <sch:rule context="/ubl:Invoice/cac:ProjectReference/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:ProjectReference/*"> <sch:assert id="PINT-JP-BM-0021" flag="fatal" test="false()"> [PINT-JP-BM-0021]-Element '/ubl:Invoice/cac:ProjectReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:ReceiptDocumentReference --> <sch:rule context="/ubl:Invoice/cac:ReceiptDocumentReference/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:ReceiptDocumentReference/*"> <sch:assert id="PINT-JP-BM-0022" flag="fatal" test="false()"> [PINT-JP-BM-0022]-Element '/ubl:Invoice/cac:ReceiptDocumentReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxRepresentativeParty --> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyName"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyTaxScheme"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/*"> <sch:assert id="PINT-JP-BM-0023" flag="fatal" test="false()"> [PINT-JP-BM-0023]-Element '/ubl:Invoice/cac:TaxRepresentativeParty' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:Contact"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyName"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/*"> <sch:assert id="PINT-JP-BM-0024" flag="fatal" test="false()"> [PINT-JP-BM-0024]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID != 'SEPA']"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID = 'SEPA']"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyName"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID != 'VAT']"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/*"> <sch:assert id="PINT-JP-BM-0025" flag="fatal" test="false()"> [PINT-JP-BM-0025]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment --> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment/cac:ExternalReference"/> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment/cbc:EmbeddedDocumentBinaryObject"/> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment/*"> <sch:assert id="PINT-JP-BM-0026" flag="fatal" test="false()"> [PINT-JP-BM-0026]-Element '/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cac:TaxCategory --> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cac:TaxCategory/cac:TaxScheme"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cac:TaxCategory/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cac:TaxCategory/cbc:Percent"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cac:TaxCategory/*"> <sch:assert id="PINT-JP-BM-0027" flag="fatal" test="false()"> [PINT-JP-BM-0027]-Element '/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cac:TaxCategory' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cac:TaxCategory --> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cac:TaxCategory/cac:TaxScheme"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cac:TaxCategory/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cac:TaxCategory/cbc:Percent"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cac:TaxCategory/*"> <sch:assert id="PINT-JP-BM-0028" flag="fatal" test="false()"> [PINT-JP-BM-0028]-Element '/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cac:TaxCategory' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:BillingReference/cac:InvoiceDocumentReference --> <sch:rule context="/ubl:Invoice/cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:BillingReference/cac:InvoiceDocumentReference/cbc:IssueDate"/> <sch:rule context="/ubl:Invoice/cac:BillingReference/cac:InvoiceDocumentReference/*"> <sch:assert id="PINT-JP-BM-0029" flag="fatal" test="false()"> [PINT-JP-BM-0029]-Element '/ubl:Invoice/cac:BillingReference/cac:InvoiceDocumentReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:Delivery/cac:DeliveryLocation --> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/*"> <sch:assert id="PINT-JP-BM-0030" flag="fatal" test="false()"> [PINT-JP-BM-0030]-Element '/ubl:Invoice/cac:Delivery/cac:DeliveryLocation' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:Delivery/cac:DeliveryParty --> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryParty/cac:PartyName"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryParty/*"> <sch:assert id="PINT-JP-BM-0031" flag="fatal" test="false()"> [PINT-JP-BM-0031]-Element '/ubl:Invoice/cac:Delivery/cac:DeliveryParty' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()] --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:AllowanceChargeReason"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:AllowanceChargeReasonCode"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:ChargeIndicator"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:MultiplierFactorNumeric"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/*"> <sch:assert id="PINT-JP-BM-0032" flag="fatal" test="false()"> [PINT-JP-BM-0032]-Element '/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()] --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:AllowanceChargeReason"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:AllowanceChargeReasonCode"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:Amount"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:BaseAmount"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:ChargeIndicator"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:MultiplierFactorNumeric"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/*"> <sch:assert id="PINT-JP-BM-0033" flag="fatal" test="false()"> [PINT-JP-BM-0033]-Element '/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:DespatchLineReference --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DespatchLineReference/cac:DocumentReference"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DespatchLineReference/cbc:LineID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DespatchLineReference/*"> <sch:assert id="PINT-JP-BM-0034" flag="fatal" test="false()"> [PINT-JP-BM-0034]-Element '/ubl:Invoice/cac:InvoiceLine/cac:DespatchLineReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[cbc:DocumentTypeCode = '130'] --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[cbc:DocumentTypeCode = '130']/cbc:DocumentTypeCode"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[cbc:DocumentTypeCode = '130']/*"> <sch:assert id="PINT-JP-BM-0035" flag="fatal" test="false()"> [PINT-JP-BM-0035]-Element '/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[cbc:DocumentTypeCode = '130']' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[not(cbc:DocumentTypeCode = '130')] --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[not(cbc:DocumentTypeCode = '130')]/cbc:DocumentTypeCode"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[not(cbc:DocumentTypeCode = '130')]/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[not(cbc:DocumentTypeCode = '130')]/*"> <sch:assert id="PINT-JP-BM-0036" flag="fatal" test="false()"> [PINT-JP-BM-0036]-Element '/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[not(cbc:DocumentTypeCode = '130')]' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:InvoicePeriod --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:InvoicePeriod/cbc:EndDate"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:InvoicePeriod/cbc:StartDate"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:InvoicePeriod/*"> <sch:assert id="PINT-JP-BM-0037" flag="fatal" test="false()"> [PINT-JP-BM-0037]-Element '/ubl:Invoice/cac:InvoiceLine/cac:InvoicePeriod' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:Item --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:AdditionalItemProperty"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:BuyersItemIdentification"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:OriginCountry"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:SellersItemIdentification"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cbc:Description"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cbc:Name"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/*"> <sch:assert id="PINT-JP-BM-0038" flag="fatal" test="false()"> [PINT-JP-BM-0038]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Item' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:OrderLineReference --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:OrderLineReference/cac:OrderReference"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:OrderLineReference/cbc:LineID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:OrderLineReference/*"> <sch:assert id="PINT-JP-BM-0039" flag="fatal" test="false()"> [PINT-JP-BM-0039]-Element '/ubl:Invoice/cac:InvoiceLine/cac:OrderLineReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:Price --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/cbc:BaseQuantity"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/cbc:PriceAmount"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/*"> <sch:assert id="PINT-JP-BM-0040" flag="fatal" test="false()"> [PINT-JP-BM-0040]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Price' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PayeeParty/cac:PartyIdentification --> <sch:rule context="/ubl:Invoice/cac:PayeeParty/cac:PartyIdentification/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:PayeeParty/cac:PartyIdentification/*"> <sch:assert id="PINT-JP-BM-0041" flag="fatal" test="false()"> [PINT-JP-BM-0041]-Element '/ubl:Invoice/cac:PayeeParty/cac:PartyIdentification' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PayeeParty/cac:PartyLegalEntity --> <sch:rule context="/ubl:Invoice/cac:PayeeParty/cac:PartyLegalEntity/cbc:CompanyID"/> <sch:rule context="/ubl:Invoice/cac:PayeeParty/cac:PartyLegalEntity/*"> <sch:assert id="PINT-JP-BM-0042" flag="fatal" test="false()"> [PINT-JP-BM-0042]-Element '/ubl:Invoice/cac:PayeeParty/cac:PartyLegalEntity' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PayeeParty/cac:PartyName --> <sch:rule context="/ubl:Invoice/cac:PayeeParty/cac:PartyName/cbc:Name"/> <sch:rule context="/ubl:Invoice/cac:PayeeParty/cac:PartyName/*"> <sch:assert id="PINT-JP-BM-0043" flag="fatal" test="false()"> [PINT-JP-BM-0043]-Element '/ubl:Invoice/cac:PayeeParty/cac:PartyName' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PaymentMeans/cac:CardAccount --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:CardAccount/cbc:HolderName"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:CardAccount/cbc:NetworkID"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:CardAccount/cbc:PrimaryAccountNumberID"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:CardAccount/*"> <sch:assert id="PINT-JP-BM-0044" flag="fatal" test="false()"> [PINT-JP-BM-0044]-Element '/ubl:Invoice/cac:PaymentMeans/cac:CardAccount' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:Name"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/*"> <sch:assert id="PINT-JP-BM-0045" flag="fatal" test="false()"> [PINT-JP-BM-0045]-Element '/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PaymentMeans/cac:PaymentMandate --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PaymentMandate/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PaymentMandate/*"> <sch:assert id="PINT-JP-BM-0046" flag="fatal" test="false()"> [PINT-JP-BM-0046]-Element '/ubl:Invoice/cac:PaymentMeans/cac:PaymentMandate' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyName --> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyName/cbc:Name"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyName/*"> <sch:assert id="PINT-JP-BM-0047" flag="fatal" test="false()"> [PINT-JP-BM-0047]-Element '/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyName' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyTaxScheme --> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyTaxScheme/cac:TaxScheme"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyTaxScheme/cbc:CompanyID"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyTaxScheme/*"> <sch:assert id="PINT-JP-BM-0048" flag="fatal" test="false()"> [PINT-JP-BM-0048]-Element '/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyTaxScheme' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress --> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cac:AddressLine"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cac:Country"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cbc:AdditionalStreetName"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cbc:CityName"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cbc:CountrySubentity"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cbc:PostalZone"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cbc:StreetName"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/*"> <sch:assert id="PINT-JP-BM-0049" flag="fatal" test="false()"> [PINT-JP-BM-0049]-Element '/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:Contact --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:ElectronicMail"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:Name"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:Telephone"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:Contact/*"> <sch:assert id="PINT-JP-BM-0050" flag="fatal" test="false()"> [PINT-JP-BM-0050]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:Contact' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/*"> <sch:assert id="PINT-JP-BM-0051" flag="fatal" test="false()"> [PINT-JP-BM-0051]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/*"> <sch:assert id="PINT-JP-BM-0052" flag="fatal" test="false()"> [PINT-JP-BM-0052]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyName --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyName/cbc:Name"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyName/*"> <sch:assert id="PINT-JP-BM-0053" flag="fatal" test="false()"> [PINT-JP-BM-0053]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyName' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/*"> <sch:assert id="PINT-JP-BM-0054" flag="fatal" test="false()"> [PINT-JP-BM-0054]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:AddressLine"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:AdditionalStreetName"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CityName"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:PostalZone"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:StreetName"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/*"> <sch:assert id="PINT-JP-BM-0055" flag="fatal" test="false()"> [PINT-JP-BM-0055]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact/cbc:ElectronicMail"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact/cbc:Name"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact/cbc:Telephone"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact/*"> <sch:assert id="PINT-JP-BM-0056" flag="fatal" test="false()"> [PINT-JP-BM-0056]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyLegalForm"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/*"> <sch:assert id="PINT-JP-BM-0057" flag="fatal" test="false()"> [PINT-JP-BM-0057]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyName --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyName/*"> <sch:assert id="PINT-JP-BM-0058" flag="fatal" test="false()"> [PINT-JP-BM-0058]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyName' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:AddressLine"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:AdditionalStreetName"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CityName"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:PostalZone"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:StreetName"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/*"> <sch:assert id="PINT-JP-BM-0059" flag="fatal" test="false()"> [PINT-JP-BM-0059]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment/cac:ExternalReference --> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment/cac:ExternalReference/cbc:URI"/> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment/cac:ExternalReference/*"> <sch:assert id="PINT-JP-BM-0060" flag="fatal" test="false()"> [PINT-JP-BM-0060]-Element '/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment/cac:ExternalReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cac:TaxCategory/cac:TaxScheme --> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cac:TaxCategory/cac:TaxScheme/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cac:TaxCategory/cac:TaxScheme/*"> <sch:assert id="PINT-JP-BM-0061" flag="fatal" test="false()"> [PINT-JP-BM-0061]-Element '/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cac:TaxCategory/cac:TaxScheme' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cac:TaxCategory/cac:TaxScheme --> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cac:TaxCategory/cac:TaxScheme/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cac:TaxCategory/cac:TaxScheme/*"> <sch:assert id="PINT-JP-BM-0062" flag="fatal" test="false()"> [PINT-JP-BM-0062]-Element '/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cac:TaxCategory/cac:TaxScheme' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address --> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cac:AddressLine"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cac:Country"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:AdditionalStreetName"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:CityName"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:CountrySubentity"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:PostalZone"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:StreetName"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/*"> <sch:assert id="PINT-JP-BM-0063" flag="fatal" test="false()"> [PINT-JP-BM-0063]-Element '/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:Delivery/cac:DeliveryParty/cac:PartyName --> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryParty/cac:PartyName/cbc:Name"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryParty/cac:PartyName/*"> <sch:assert id="PINT-JP-BM-0064" flag="fatal" test="false()"> [PINT-JP-BM-0064]-Element '/ubl:Invoice/cac:Delivery/cac:DeliveryParty/cac:PartyName' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:DespatchLineReference/cac:DocumentReference --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DespatchLineReference/cac:DocumentReference/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DespatchLineReference/cac:DocumentReference/*"> <sch:assert id="PINT-JP-BM-0065" flag="fatal" test="false()"> [PINT-JP-BM-0065]-Element '/ubl:Invoice/cac:InvoiceLine/cac:DespatchLineReference/cac:DocumentReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:AdditionalItemProperty --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:AdditionalItemProperty/cbc:Name"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:AdditionalItemProperty/cbc:Value"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:AdditionalItemProperty/*"> <sch:assert id="PINT-JP-BM-0066" flag="fatal" test="false()"> [PINT-JP-BM-0066]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:AdditionalItemProperty' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:BuyersItemIdentification --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:BuyersItemIdentification/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:BuyersItemIdentification/*"> <sch:assert id="PINT-JP-BM-0067" flag="fatal" test="false()"> [PINT-JP-BM-0067]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:BuyersItemIdentification' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cac:TaxScheme"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:PerUnitAmount"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:Percent"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/*"> <sch:assert id="PINT-JP-BM-0068" flag="fatal" test="false()"> [PINT-JP-BM-0068]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification/*"> <sch:assert id="PINT-JP-BM-0069" flag="fatal" test="false()"> [PINT-JP-BM-0069]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:OriginCountry --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:OriginCountry/cbc:IdentificationCode"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:OriginCountry/*"> <sch:assert id="PINT-JP-BM-0070" flag="fatal" test="false()"> [PINT-JP-BM-0070]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:OriginCountry' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:SellersItemIdentification --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:SellersItemIdentification/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:SellersItemIdentification/*"> <sch:assert id="PINT-JP-BM-0071" flag="fatal" test="false()"> [PINT-JP-BM-0071]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:SellersItemIdentification' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/*"> <sch:assert id="PINT-JP-BM-0072" flag="fatal" test="false()"> [PINT-JP-BM-0072]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:OrderLineReference/cac:OrderReference --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:OrderLineReference/cac:OrderReference/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:OrderLineReference/cac:OrderReference/*"> <sch:assert id="PINT-JP-BM-0073" flag="fatal" test="false()"> [PINT-JP-BM-0073]-Element '/ubl:Invoice/cac:InvoiceLine/cac:OrderLineReference/cac:OrderReference' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()] --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:ChargeIndicator"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/*"> <sch:assert id="PINT-JP-BM-0074" flag="fatal" test="false()"> [PINT-JP-BM-0074]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/*"> <sch:assert id="PINT-JP-BM-0075" flag="fatal" test="false()"> [PINT-JP-BM-0075]-Element '/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/*"> <sch:assert id="PINT-JP-BM-0076" flag="fatal" test="false()"> [PINT-JP-BM-0076]-Element '/ubl:Invoice/cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyTaxScheme/cac:TaxScheme --> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyTaxScheme/cac:TaxScheme/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyTaxScheme/cac:TaxScheme/*"> <sch:assert id="PINT-JP-BM-0077" flag="fatal" test="false()"> [PINT-JP-BM-0077]-Element '/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyTaxScheme/cac:TaxScheme' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cac:AddressLine --> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cac:AddressLine/cbc:Line"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cac:AddressLine/*"> <sch:assert id="PINT-JP-BM-0078" flag="fatal" test="false()"> [PINT-JP-BM-0078]-Element '/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cac:AddressLine' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cac:Country --> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cac:Country/cbc:IdentificationCode"/> <sch:rule context="/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cac:Country/*"> <sch:assert id="PINT-JP-BM-0079" flag="fatal" test="false()"> [PINT-JP-BM-0079]-Element '/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cac:Country' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme/*"> <sch:assert id="PINT-JP-BM-0080" flag="fatal" test="false()"> [PINT-JP-BM-0080]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:AddressLine --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:AddressLine/cbc:Line"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:AddressLine/*"> <sch:assert id="PINT-JP-BM-0081" flag="fatal" test="false()"> [PINT-JP-BM-0081]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:AddressLine' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode"/> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country/*"> <sch:assert id="PINT-JP-BM-0082" flag="fatal" test="false()"> [PINT-JP-BM-0082]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID != 'SEPA'] --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID != 'SEPA']/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID != 'SEPA']/*"> <sch:assert id="PINT-JP-BM-0083" flag="fatal" test="false()"> [PINT-JP-BM-0083]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID != 'SEPA']' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID = 'SEPA'] --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID = 'SEPA']/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID = 'SEPA']/*"> <sch:assert id="PINT-JP-BM-0084" flag="fatal" test="false()"> [PINT-JP-BM-0084]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID = 'SEPA']' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID != 'VAT'] --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID != 'VAT']/cac:TaxScheme"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID != 'VAT']/cbc:CompanyID"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID != 'VAT']/*"> <sch:assert id="PINT-JP-BM-0085" flag="fatal" test="false()"> [PINT-JP-BM-0085]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID != 'VAT']' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT'] --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cac:TaxScheme"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/*"> <sch:assert id="PINT-JP-BM-0086" flag="fatal" test="false()"> [PINT-JP-BM-0086]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:AddressLine --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:AddressLine/cbc:Line"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:AddressLine/*"> <sch:assert id="PINT-JP-BM-0087" flag="fatal" test="false()"> [PINT-JP-BM-0087]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:AddressLine' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/*"> <sch:assert id="PINT-JP-BM-0088" flag="fatal" test="false()"> [PINT-JP-BM-0088]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cac:AddressLine --> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cac:AddressLine/cbc:Line"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cac:AddressLine/*"> <sch:assert id="PINT-JP-BM-0089" flag="fatal" test="false()"> [PINT-JP-BM-0089]-Element '/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cac:AddressLine' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cac:Country --> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cac:Country/cbc:IdentificationCode"/> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cac:Country/*"> <sch:assert id="PINT-JP-BM-0090" flag="fatal" test="false()"> [PINT-JP-BM-0090]-Element '/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cac:Country' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cac:TaxScheme --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cac:TaxScheme/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cac:TaxScheme/*"> <sch:assert id="PINT-JP-BM-0091" flag="fatal" test="false()"> [PINT-JP-BM-0091]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cac:TaxScheme' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cac:AddressLine"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cac:Country"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cbc:AdditionalStreetName"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cbc:CityName"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cbc:CountrySubentity"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cbc:PostalZone"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cbc:StreetName"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/*"> <sch:assert id="PINT-JP-BM-0092" flag="fatal" test="false()"> [PINT-JP-BM-0092]-Element '/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode] --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cbc:TaxAmount"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/*"> <sch:assert id="PINT-JP-BM-0093" flag="fatal" test="false()"> [PINT-JP-BM-0093]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode] --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cbc:TaxAmount"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/*"> <sch:assert id="PINT-JP-BM-0094" flag="fatal" test="false()"> [PINT-JP-BM-0094]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID != 'VAT']/cac:TaxScheme --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID != 'VAT']/cac:TaxScheme/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID != 'VAT']/cac:TaxScheme/*"> <sch:assert id="PINT-JP-BM-0095" flag="fatal" test="false()"> [PINT-JP-BM-0095]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID != 'VAT']/cac:TaxScheme' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cac:TaxScheme --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cac:TaxScheme/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cac:TaxScheme/*"> <sch:assert id="PINT-JP-BM-0096" flag="fatal" test="false()"> [PINT-JP-BM-0096]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cac:TaxScheme' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cac:AddressLine --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cac:AddressLine/cbc:Line"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cac:AddressLine/*"> <sch:assert id="PINT-JP-BM-0097" flag="fatal" test="false()"> [PINT-JP-BM-0097]-Element '/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cac:AddressLine' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cac:Country --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cac:Country/cbc:IdentificationCode"/> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cac:Country/*"> <sch:assert id="PINT-JP-BM-0098" flag="fatal" test="false()"> [PINT-JP-BM-0098]-Element '/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address/cac:Country' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cbc:TaxAmount"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cbc:TaxableAmount"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/*"> <sch:assert id="PINT-JP-BM-0099" flag="fatal" test="false()"> [PINT-JP-BM-0099]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal/cbc:TaxAmount"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal/*"> <sch:assert id="PINT-JP-BM-0100" flag="fatal" test="false()"> [PINT-JP-BM-0100]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory/cbc:Percent"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory/*"> <sch:assert id="PINT-JP-BM-0101" flag="fatal" test="false()"> [PINT-JP-BM-0101]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory/cbc:Percent"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory/*"> <sch:assert id="PINT-JP-BM-0102" flag="fatal" test="false()"> [PINT-JP-BM-0102]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> <!-- Allowed children of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID"/> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/*"> <sch:assert id="PINT-JP-BM-0103" flag="fatal" test="false()"> [PINT-JP-BM-0103]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme' MUST NOT contain child elements that are not part of the JP PINT data model. </sch:assert> </sch:rule> </sch:pattern> <sch:pattern id="PINT-JP-BASIC-MODEL-ATTRIBUTES"> <!-- Allowed attributes of /ubl:Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID"> <sch:assert id="PINT-JP-BM-A0001" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0001]-Element '/ubl:Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount"> <sch:assert id="PINT-JP-BM-A0002" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0002]-Element '/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount"> <sch:assert id="PINT-JP-BM-A0003" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0003]-Element '/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:Amount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:Amount"> <sch:assert id="PINT-JP-BM-A0004" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0004]-Element '/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:Amount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:BaseAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:BaseAmount"> <sch:assert id="PINT-JP-BM-A0005" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0005]-Element '/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:BaseAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cbc:InvoicedQuantity: @unitCode --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cbc:InvoicedQuantity"> <sch:assert id="PINT-JP-BM-A0006" flag="fatal" test="not(@*[local-name() != 'unitCode'])"> [PINT-JP-BM-A0006]-Element '/ubl:Invoice/cac:InvoiceLine/cbc:InvoicedQuantity' MUST NOT contain attributes other than @unitCode. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cbc:LineExtensionAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cbc:LineExtensionAmount"> <sch:assert id="PINT-JP-BM-A0007" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0007]-Element '/ubl:Invoice/cac:InvoiceLine/cbc:LineExtensionAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount"> <sch:assert id="PINT-JP-BM-A0008" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0008]-Element '/ubl:Invoice/cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:LegalMonetaryTotal/cbc:ChargeTotalAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:ChargeTotalAmount"> <sch:assert id="PINT-JP-BM-A0009" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0009]-Element '/ubl:Invoice/cac:LegalMonetaryTotal/cbc:ChargeTotalAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:LegalMonetaryTotal/cbc:LineExtensionAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:LineExtensionAmount"> <sch:assert id="PINT-JP-BM-A0010" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0010]-Element '/ubl:Invoice/cac:LegalMonetaryTotal/cbc:LineExtensionAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount"> <sch:assert id="PINT-JP-BM-A0011" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0011]-Element '/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableRoundingAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableRoundingAmount"> <sch:assert id="PINT-JP-BM-A0012" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0012]-Element '/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableRoundingAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:LegalMonetaryTotal/cbc:PrepaidAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PrepaidAmount"> <sch:assert id="PINT-JP-BM-A0013" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0013]-Element '/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PrepaidAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount"> <sch:assert id="PINT-JP-BM-A0014" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0014]-Element '/ubl:Invoice/cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:LegalMonetaryTotal/cbc:TaxInclusiveAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:TaxInclusiveAmount"> <sch:assert id="PINT-JP-BM-A0015" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0015]-Element '/ubl:Invoice/cac:LegalMonetaryTotal/cbc:TaxInclusiveAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:PaymentMeans/cbc:PaymentID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cbc:PaymentID"> <sch:assert id="PINT-JP-BM-A0016" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0016]-Element '/ubl:Invoice/cac:PaymentMeans/cbc:PaymentID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:PaymentMeans/cbc:PaymentMeansCode: @name --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cbc:PaymentMeansCode"> <sch:assert id="PINT-JP-BM-A0017" flag="fatal" test="not(@*[local-name() != 'name'])"> [PINT-JP-BM-A0017]-Element '/ubl:Invoice/cac:PaymentMeans/cbc:PaymentMeansCode' MUST NOT contain attributes other than @name. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:PaymentTerms/cbc:Amount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:PaymentTerms/cbc:Amount"> <sch:assert id="PINT-JP-BM-A0018" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0018]-Element '/ubl:Invoice/cac:PaymentTerms/cbc:Amount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID"> <sch:assert id="PINT-JP-BM-A0019" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0019]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cbc:EndpointID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID"> <sch:assert id="PINT-JP-BM-A0020" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0020]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment/cbc:EmbeddedDocumentBinaryObject: @filename, @mimeCode --> <sch:rule context="/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment/cbc:EmbeddedDocumentBinaryObject"> <sch:assert id="PINT-JP-BM-A0021" flag="fatal" test="not(@*[local-name() != 'filename' and local-name() != 'mimeCode'])"> [PINT-JP-BM-A0021]-Element '/ubl:Invoice/cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode = '130')]/cac:Attachment/cbc:EmbeddedDocumentBinaryObject' MUST NOT contain attributes other than @filename, @mimeCode. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cbc:ID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cbc:ID"> <sch:assert id="PINT-JP-BM-A0022" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0022]-Element '/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cbc:ID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount"> <sch:assert id="PINT-JP-BM-A0023" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0023]-Element '/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount"> <sch:assert id="PINT-JP-BM-A0024" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0024]-Element '/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:Amount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:Amount"> <sch:assert id="PINT-JP-BM-A0025" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0025]-Element '/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:Amount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:BaseAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:BaseAmount"> <sch:assert id="PINT-JP-BM-A0026" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0026]-Element '/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:BaseAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID"> <sch:assert id="PINT-JP-BM-A0027" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0027]-Element '/ubl:Invoice/cac:InvoiceLine/cac:DocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cac:Price/cbc:BaseQuantity: @unitCode --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/cbc:BaseQuantity"> <sch:assert id="PINT-JP-BM-A0028" flag="fatal" test="not(@*[local-name() != 'unitCode'])"> [PINT-JP-BM-A0028]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Price/cbc:BaseQuantity' MUST NOT contain attributes other than @unitCode. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cac:Price/cbc:PriceAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/cbc:PriceAmount"> <sch:assert id="PINT-JP-BM-A0029" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0029]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Price/cbc:PriceAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:PayeeParty/cac:PartyIdentification/cbc:ID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:PayeeParty/cac:PartyIdentification/cbc:ID"> <sch:assert id="PINT-JP-BM-A0030" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0030]-Element '/ubl:Invoice/cac:PayeeParty/cac:PartyIdentification/cbc:ID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:PayeeParty/cac:PartyLegalEntity/cbc:CompanyID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:PayeeParty/cac:PartyLegalEntity/cbc:CompanyID"> <sch:assert id="PINT-JP-BM-A0031" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0031]-Element '/ubl:Invoice/cac:PayeeParty/cac:PartyLegalEntity/cbc:CompanyID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID"> <sch:assert id="PINT-JP-BM-A0032" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0032]-Element '/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID"> <sch:assert id="PINT-JP-BM-A0033" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0033]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID"> <sch:assert id="PINT-JP-BM-A0034" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0034]-Element '/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID"> <sch:assert id="PINT-JP-BM-A0035" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0035]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode: @listID, @listVersionID --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode"> <sch:assert id="PINT-JP-BM-A0036" flag="fatal" test="not(@*[local-name() != 'listID' and local-name() != 'listVersionID'])"> [PINT-JP-BM-A0036]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode' MUST NOT contain attributes other than @listID, @listVersionID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID"> <sch:assert id="PINT-JP-BM-A0037" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0037]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount"> <sch:assert id="PINT-JP-BM-A0038" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0038]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:Amount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount"> <sch:assert id="PINT-JP-BM-A0039" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0039]-Element '/ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:BaseAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID != 'SEPA']/cbc:ID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID != 'SEPA']/cbc:ID"> <sch:assert id="PINT-JP-BM-A0040" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0040]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID != 'SEPA']/cbc:ID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID = 'SEPA']/cbc:ID: @schemeID --> <sch:rule context="/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID = 'SEPA']/cbc:ID"> <sch:assert id="PINT-JP-BM-A0041" flag="fatal" test="not(@*[local-name() != 'schemeID'])"> [PINT-JP-BM-A0041]-Element '/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification[cbc:ID/@schemeID = 'SEPA']/cbc:ID' MUST NOT contain attributes other than @schemeID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cbc:TaxAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cbc:TaxAmount"> <sch:assert id="PINT-JP-BM-A0042" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0042]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cbc:TaxAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cbc:TaxAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cbc:TaxAmount"> <sch:assert id="PINT-JP-BM-A0043" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0043]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cbc:TaxAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cbc:TaxAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cbc:TaxAmount"> <sch:assert id="PINT-JP-BM-A0044" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0044]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cbc:TaxAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cbc:TaxableAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cbc:TaxableAmount"> <sch:assert id="PINT-JP-BM-A0045" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0045]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:DocumentCurrencyCode]/cac:TaxSubtotal/cbc:TaxableAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> <!-- Allowed attributes of /ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal/cbc:TaxAmount: @currencyID --> <sch:rule context="/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal/cbc:TaxAmount"> <sch:assert id="PINT-JP-BM-A0046" flag="fatal" test="not(@*[local-name() != 'currencyID'])"> [PINT-JP-BM-A0046]-Element '/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID =/ubl:Invoice/cbc:TaxCurrencyCode]/cac:TaxSubtotal/cbc:TaxAmount' MUST NOT contain attributes other than @currencyID. </sch:assert> </sch:rule> </sch:pattern> </sch:schema> -
[3] JP PINT 2025-Q4, Invoice Transaction, Syntax binding
https://docs.peppol.eu/poac/jp/2025-Q4/pint-jp/trn-invoice/syntax/ -
[4] Peppol BIS Billing 3.0, Rules
https://docs.peppol.eu/poacc/billing/3.0/rules/ -
[5] Peppol BIS Billing 3.0, EN16931 model bound to UBL
https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/ -
[6] Peppol BIS Billing 3.0, Rules for Peppol BIS 3.0 Billing
https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-peppol/ -
[7] Peppol International (PINT) Specifications for the European Union, Schematrons
https://docs.peppol.eu/poac/eu/pint-eu/trn-invoice/rule/ -
[8] Peppol International (PINT) Specifications for the European Union, Shared PINT rules
https://docs.peppol.eu/poac/eu/pint-eu/trn-invoice/rule/PINT-UBL-validation-preprocessed/ -
[9] Peppol International (PINT) Specifications for the European Union, EN16931 specific PINT rules
https://docs.peppol.eu/poac/eu/pint-eu/trn-invoice/rule/PINT-EN16931-aligned-rules/ -
[10] Peppol International (PINT) Specifications for the European Union, Rule
UBL-CR-002
https://docs.peppol.eu/poac/eu/pint-eu/trn-invoice/rule/UBL-CR-002/ -
[11] JP PINT 1.0 test site, billing Japan
https://www.sambuichi.jp/jp_pint/billing-japan/ -
[12] JP PINT syntax binding tree used for Basic Rule generation
https://www.sambuichi.jp/jp_pint/billing-japan/syntax2/ubl-invoice/tree/en/ -
[13] JP PINT 2025-Q4, Download resources
https://docs.peppol.eu/poac/jp/2025-Q4/pint-jp/resources.zip -
[14] Peppol BIS Billing 3.0,
ubl:Invoice
https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/ -
[15] Peppol BIS Billing 3.0,
cac:TaxTotal
https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cac-TaxTotal/ -
[16] Peppol BIS Billing 3.0,
cac:TaxCategory
https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cac-TaxTotal/cac-TaxSubtotal/cac-TaxCategory/ -
[17] Peppol BIS Billing 3.0,
cac:TaxScheme
https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cac-TaxTotal/cac-TaxSubtotal/cac-TaxCategory/cac-TaxScheme/ -
[18] Peppol International (PINT) Specifications for the European Union, Invoice Transaction Syntax binding
https://docs.peppol.eu/poac/eu/pint-eu/trn-invoice/syntax/
==
- 1. はじめに
- 2. 背景: なぜBasic Ruleが必要か
- 3. OpenPeppol BIS Billing 3.0とPINT EUにおけるBasic Rule相当のルール
- 4. 今回使用したSyntax binding treeについて
- 5. 今回作成したBasic Rule生成スクリプト
- 6. 生成されるSchematronの考え方
- 7. 検証対象のサンプル
- 8. サンプル検証で検出された不整合
- 9. OpenPeppol Operation Officeへの報告
- 10. IBT-192-1としての追加提案
- 11. PEPPOL-22903との関係
- 12. Basic Rule生成によって分かったこと
- 13. 実装上の注意点
- 14. 今後の改善提案
- 15. まとめ
- 16. 参考


コメントを残す