Invoice schema does not import correctly

Hi folks

I'm working on PEPPOL/UBL for a customer, and have downloaded the 2.1 UBL schemas. The UBL-Invoice-2.1.xsd does not import correctly - there's a missing dependency for the element. That's in the UBL-xmldsig-core-schema-2.1.xsd file, which is not imported

I tried adding the UBL-SignatureAggregateComponents-2.1.xsd file as an import, as that in turn imports the xmldsig namespace, but that's still not working. A check of a couple of the other maindoc schemas suggests that this is a general problem.

Has anyone else hit this, or found a way round it?



Martin GK


To import the UBL-Invoice-2.1.xsd ( and any other I think ) to generate classes from the XSD files  ( with a tool like xsd2code++ ) just remove the DOCTYPE section in the UBL-xmldsig-core-schema-2.1.xsd file.  ( I also moved all common files to the maindoc folder and removed the "../common"  part from the relative import schemaLocation statements to get xsd2code++ going. 


Thank you, Martin, for your post.  Although I am responding personally as a member of the community, it happens I am responsible for the XSD files generated from the business objects. I am unaware of any dependency issue and so I have not hit your issue.  The UBL 2.1 invoice schema has been used globally for years without anyone else reporting such an issue.

As a sanity check just now I have successfully validated the UBL Invoice test instance in the UBL 2.1 distribution with the distributed XSD for the Invoice.  As part of my pre-distribution tests I check with the Xerces, Saxon and Altova XML Validation processors, and as then they successfully pass today.

Can you cite where you believe the dependency is in the existing XSD files?  Do you have an XML instance that triggers the dependency?

Posting here is fine for getting a community response, and I'm responding with my personal experience, but the best place to report this kind of concern with evidence is the UBL Comment List as this will trigger a formal response from the UBL Technical Committee.

I hope this helps!

. . . . . . Ken Focus Areas: BPEL | DITA | ebXML | IDtrust | OpenDocument | SAML | UBL | UDDI
OASIS sites: OASIS | Cover Pages | | AMQP | CGM Open | eGov | Emergency | IDtrust | LegalXML | Open CSA | OSLC | WS-I