You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Mustang Version 2.10.0 we noticed a problem regarding empty elements in the document.
Example:
final TradeParty tradeParty = new TradeParty();
tradeParty.setAdditionalAddress(null);
Results in the following Output:
Which results in the following validaiton error: <error type="27" location="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction[1]/ram:ApplicableHeaderTradeAgreement[1]/ram:BuyerTradeParty[1]/ram:PostalTradeAddress[1]/ram:LineTwo[1]" criterion="false()">Document MUST not contain empty elements. [ID PEPPOL-EN16931-R008] from /xslt/XR_30/XRechnung-CII-validation.xslt)</error>
Should this not be ignored in case of null or an empty (trimmed) string? I fixed it by testing the string before calling the method, but it might be more comfortable if the library does it internally?
Thanks for the help.
The text was updated successfully, but these errors were encountered:
This "requirement" is relatively new (XRechnung 3), and strange, if you ask me, but please feel invited to submit a PR to only write non-empty elements
Hi,
In Mustang Version 2.10.0 we noticed a problem regarding empty elements in the document.
Example:
Results in the following Output:
![image](https://private-user-images.githubusercontent.com/71561900/314477111-181eda60-69fa-4034-8174-2ebc105b66e4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMjQ0NDUsIm5iZiI6MTcyNjEyNDE0NSwicGF0aCI6Ii83MTU2MTkwMC8zMTQ0NzcxMTEtMTgxZWRhNjAtNjlmYS00MDM0LTgxNzQtMmViYzEwNWI2NmU0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA2NTU0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWExNjFkZTA5YWJmNWU5YzZiZjM5ZTRiZTIxN2M5M2Y0YjFjNmQ0NjZmMmM2NjQ5OWQyYjRhZTVlZjk1N2Q5ZjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.j8phNtZ84pSQB0W6JWXtCUFjw9tLy6_Pir60DdW1cUg)
Which results in the following validaiton error:
<error type="27" location="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction[1]/ram:ApplicableHeaderTradeAgreement[1]/ram:BuyerTradeParty[1]/ram:PostalTradeAddress[1]/ram:LineTwo[1]" criterion="false()">Document MUST not contain empty elements. [ID PEPPOL-EN16931-R008] from /xslt/XR_30/XRechnung-CII-validation.xslt)</error>
Should this not be ignored in case of null or an empty (trimmed) string? I fixed it by testing the string before calling the method, but it might be more comfortable if the library does it internally?
Thanks for the help.
The text was updated successfully, but these errors were encountered: