Fix: UBL Writer/Reader TaxRepresentativeParty and SubInvoiceLine XPath#888
Merged
stephanstapel merged 1 commit intostephanstapel:masterfrom Mar 9, 2026
Merged
Conversation
UBL Writer: cac:TaxRepresentativeParty is directly of type PartyType in UBL schema, so it must not contain a nested cac:Party element. The extra wrapper caused data loss when reading with spec-compliant parsers. UBL Reader: Changed XPath for TaxRepresentativeParty from //cac:TaxRepresentativeParty/cac:Party to //cac:TaxRepresentativeParty to match the corrected Writer output and UBL schema. UBL Reader: Changed SubInvoiceLine XPath from .//cac:SubInvoiceLine (descendant) to cac:SubInvoiceLine (direct children only). The descendant selector caused wrong ParentLineIDs at 3+ nesting levels. Also added missing cac:SubCreditNoteLine support for credit notes. Added TestTaxRepresentativePartyNoNestedPartyElement to verify XML structure and roundtrip. Existing TestParentLineId covers the SubInvoiceLine fix with its 3-level nesting hierarchy.
|
stephanstapel
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Fix: UBL Writer/Reader TaxRepresentativeParty and SubInvoiceLine XPath
Checklist
.Result/GetAwaiter().GetResult())CancellationTokenrespecteddotnet buildno warnings as errors)dotnet format --verify-no-changespassesBreaking changes?