phax / ph-ubl

Java library for reading and writing UBL 2.0, 2.1, 2.2, 2.3 and 2.4 documents
Apache License 2.0
106 stars 40 forks source link

Support for ublpe21 #17

Closed carlosthe19916 closed 3 years ago

carlosthe19916 commented 5 years ago

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

phax commented 5 years ago

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

carlosthe19916 commented 5 years ago

@phax this a link that contains XSDs for UBL 2.1

https://github.com/FrameworkPeru/openinvoiceperudocs/tree/master/Documentacion/UBL21/Ejemplos/xsd

phax commented 5 years ago

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

carlosthe19916 commented 5 years ago

@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"));
phax commented 5 years ago

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.

carlosthe19916 commented 5 years ago

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.

stale[bot] commented 5 years ago

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.

phax commented 5 years ago

Any action from my side needed? @carlosthe19916

stale[bot] commented 5 years ago

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.