phax / ph-ubl

Java library for reading and writing UBL 2.0, 2.1, 2.2, 2.3 and 2.4 (CS01) documents

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for ublpe21

carlosthe19916 opened this issue · comments

The current version of ublpe is using UBL 2.0 but it would be great to include support for UBL 2.1

Do you have a link where I can find the XSDs and the like?

UBLPE 2.1 is exactly identical to regular UBL 2.1 - I don't see any difference in the XSDs :D

@phax Yes you're right they are equal. However, is not possible to use UBLPEWriter with UBL21. For example this code works:

oasis.names.specification.ubl.schema.xsd.invoice_2.InvoiceType invoiceType20;
UBLPEWriter.invoice().write(invoiceType20, new File("myfile.xml"));

but this does not:

oasis.names.specification.ubl.schema.xsd.invoice_21.InvoiceType invoiceType21;
UBLPEWriter.invoice().write(invoiceType21, new File("myfile.xml"));

Yes, because sometimes it is UBL 2.0 and sometimes it is UBL 2.1.
Is it possible for you to use class UBL21Reader and UBL21Writer from thew Maven artefact com.helger:ph-ubl21?
It would be possible to add it to the ublpe package, but that means, that it would depend from both Maven artefacts ph-ubl20 and ph-ubl21 which would bloat the result application file size.

I don't think include both artifacts ph-ubl20 and ph-ubl21 is a good idea. I was thinking about creating another maven module called ph-ublpe21 which can include dependencies for ph-ubl21.

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Any action from my side needed? @carlosthe19916

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.