Basic Picture
Is the basic picture here that you have XSD files that define the components of XML files, with each component having a name and some constraints as defined in the XSD files, and having a prefic that is the code that distinguishes which XSD file the component is defined in.
2. Basically correct?
I have downloaded the two zip files.
2. Do you merge the contents of the two folders that unzip? If so what do you do with names that are the same in both folders?
3. Given that the above if I was to say that while there are spreadsheets and so on that assist in an understanding of UBL in what is downloaded it is the contents of the two folders call XSD that are UBL. If I adhere to the underlying allowed text and format and constraints contained in those folders I wil have correct UBL. Is that correct?
4. If I was a martian landing on earth for the first time how would I know that this in an XML doc "xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" was referring to this file "UBL-CommonBasicComponents-2.0.xsd"
I mean the strings are similar and knowing a little leads you to conclude that they are one and the same but they are not identical. There must be another rule that determines that they are one in the same. What is that rule.
TIA [once I get away I will be no further bother].
I have sorted most of this
I have sorted most of this now.
It seems the update needs to have the files in it's folders copied to the same folders in the os-UBL-2.0 folder. That is it doesn't replace them all just some. Why would you not have a folder that is "s-UBL-2.0 and update" for download in one hit makes me worry I don't have this correct however it looks from the files and so on that I do.
My next challenge is to see if I can get one invoice in an XML file that is compliant with the xsd "UBL-Invoice-2.0".
I downloaded that NetBeans program as I can see they have an xsd xml interface. I figure that all these xsd xml programs would work the same in that you would point them to a local copy of the xsd files that is UBL-Invoice-2.0 or that UBL-Invoice-2.0 refers to and then type away in your XML and then have your program test your XML against the xsd's and tell you if compliant?
Answers to your questions
1) Yes, you have the basic picture of describing the syntax of UBL documents.
2) The two zip files are downloaded separately and are unzipped into the same directory with the updated files overwriting the corresponding files in the original. These instructions are in the HTML file in the update:
http://docs.oasis-open.org/ubl/os-UBL-2.0-update/os-UBL-2.0-update.html
3) If your XML instance validates with the committees XSD files, and you follow the documented additional document constraints in section 6 of the main documentation:
http://docs.oasis-open.org/ubl/os-UBL-2.0/UBL-2.0.html#CONSTRAINTS
... then you will have an instance that conforms to UBL.
But please note that the UBL committee *does not* dictate anything about the semantics of the content ... only the structure. It is up to a user community that is adopting UBL for the structures to document what goes in the content. For example, your purchase of goods in Australia includes VAT in the prices while my purchase of goods in Canada does not include VAT in the prices. UBL accommodates both by not saying anything about including VAT in the prices. It is up to a community of users using UBL to state that within that community VAT is or is not included in prices.
I can help you with the syntax but I suspect the experts who are on UBL-Dev can better help you with the choices of UBL elements to use.
4) One can see in every document schema, such as:
http://docs.oasis-open.org/ubl/os-UBL-2.0/xsd/maindoc/UBL-Invoice-2.0.xsd
... that xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 refers to UBL-CommonBasicComponents-2.0.xsd because of the <xsd:import> statement that reads as follows:
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" schemaLocation="../common/UBL-CommonBasicComponents-2.0.xsd" />
The "rule" you ask about is basic XSD functionality and not needed to be included in the UBL specification. The UBL specification is not a place to learn about XSD syntax, as it would not be our place to copy XSD specification details into the UBL documents.
5) Your questions are no bother at all! They are most welcome and I hope that you will subscribe to UBL-Dev and continue to post your experiences and your questions. All feedback, good and bad, is useful to the committee.
6) I cannot help you with NetBeans as I am not a Java programmer. Please read the section I cited above regarding additional document constraints and also read in the specification on two-phase document validation to see the complete picture:
file:///U:/cd/artefacts/os-UBL-2.0/UBL-2.0.html#CODELISTS
Working with XML properly involves understanding the underlying technologies and how they work. I doubt you would yet find a simple subroutine call to satisfy all of the document validation constraints describing a UBL document.
I hope you find this useful!
. . . . . . . . . . Ken