OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [ubl-dev] query about Amount.currencyID


If you look at the schema hierarchy, you'll see that the Unqualified Data Types (UDT) builds on the CCTS Core Component Types (CCTS-CCT):

http://docs.oasis-open.org/ubl/os-UBL-2.2/UBL-2.2.html#S-UBL-VALIDATION-ARTEFACT-GENERATION

In the UDT fragment:

http://docs.oasis-open.org/ubl/os-UBL-2.2/xsd/common/UBL-UnqualifiedDataTypes-2.2.xsd

... I observe that the attribute is made requied:

  <xsd:complexType name="AmountType">
    <xsd:annotation>
      <xsd:documentation xml:lang="en">
        <ccts:UniqueID>UBLUDT000001</ccts:UniqueID>
        <ccts:CategoryCode>UDT</ccts:CategoryCode>
        <ccts:DictionaryEntryName>Amount. Type</ccts:DictionaryEntryName>
        <ccts:VersionID>1.0</ccts:VersionID>
<ccts:Definition>A number of monetary units specified using a given unit of currency.</ccts:Definition>
        <ccts:RepresentationTermName>Amount</ccts:RepresentationTermName>
      </xsd:documentation>
    </xsd:annotation>
    <xsd:simpleContent>
      <xsd:restriction base="ccts-cct:AmountType">
<xsd:attribute name="currencyID" type="xsd:normalizedString" use="required">
           <xsd:annotation>
              <xsd:documentation xml:lang="en">
                 <ccts:UniqueID>UNDT000001-SC2</ccts:UniqueID>
                 <ccts:CategoryCode>SC</ccts:CategoryCode>
<ccts:DictionaryEntryName>Amount. Currency. Identifier</ccts:DictionaryEntryName> <ccts:Definition>The currency of the amount.</ccts:Definition>
                 <ccts:ObjectClass>Amount Currency</ccts:ObjectClass>
                 <ccts:PropertyTermName>Identification</ccts:PropertyTermName>
                 <ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
                 <ccts:PrimitiveType>string</ccts:PrimitiveType>
<ccts:UsageRule>Reference UNECE Rec 9, using 3-letter alphabetic codes.</ccts:UsageRule>
              </xsd:documentation>
           </xsd:annotation>
        </xsd:attribute>
      </xsd:restriction>
    </xsd:simpleContent>
  </xsd:complexType>

Regarding your last question, for fidelity reasons both the XSD files and the HTML files are generated from the one genericode expression of the document models:

http://docs.oasis-open.org/ubl/os-UBL-2.2/mod/UBL-Entities-2.2.gc

This machine-readable file is created from the committee online Google spreadsheets and, again for fidelity reasons, is used to create all model expressions including the distribution spreadsheets:

http://docs.oasis-open.org/ubl/os-UBL-2.2/UBL-2.2.html#S-THE-USE-OF-THE-OASIS-BUSINESS-DOCUMENT-NAMING-AND-DESIGN-RULES

All of the tools used to go from the Google spreadsheets to the committee artefacts are freely available, as described here:

http://goo.gl/DgMAqy

For those who are creating subset models of the UBL model, that page describes how to annotate a copy of the Google spreadsheet and create your own artefacts.

I hope this is helpful.

. . . . . Ken

At 2019-07-21 11:43 +0000, David Goodenough wrote:

According to docs.oasis-open.org/ubl/os-UBL-2.2/mod/summary/reports/UBL-Invoice-2.2.html#UDT-AmountType currencyID is a required field.



However docs.oasis-open.org/ubl/xsd/common/CCTS-CCT-SchemaModule-2.2.xsd we have <xsd:attribute name="currencyID" type="xsd:normalizedString" use="optional">



The original version of my UBL code was built by hand from the summary reports, but I have now changed to using a home build generator - the schema to scala off the peg generators make such a meal of the XSD files that some of the class files break the JVM class file size limit.



Am I reading the wrong files? Is this field required (it should be)? I thought the html files were generated from the schemas?



David


--
Contact info, blog, articles, etc. http://www.CraneSoftwrights.com/u/ |
Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
Streaming hands-on XSLT/XPath 2 training class @ US$45 (5 hours free) |



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]