Next in thread → Next in month →

Re: [ubl] ATG2 udt:Amount and the need for a UBL 2.0 UBLAmount

From
Tim McGrath
Date
2005-09-14T09:55:00+00:00
ID
Thread
Re: [ubl] ATG2 udt:Amount and the need for a UBL 2.0 UBLAmount
MHonArc v2.5.0b2 -->

















ubl message






[Date Prev]
 | [Thread Prev]
 | [Thread Next]
 | [Date Next]

--

[Date Index]
 | [Thread Index]
 | [List Home]








Subject: Re: [ubl] ATG2 udt:Amount and the need for a UBL 2.0 UBLAmount




From: Tim McGrath <>
To: Stephen Green <>
Date: Wed, 14 Sep 2005 11:42:58 +0800










not sure i follow the logic here.  my understanding is that the ATG2
UQT for AmountType requires a CurrencyID attribute as per:


<xsd:extension base="xsd:decimal">

    <xsd:attribute name="currencyID"
type="clm54217:CurrencyCodeContentType" use="required">

    </xsd:attribute>

</xsd:extension>


and that the namespace is:

<xsd:import
namespace="urn:un:unece:uncefact:codelist:draft:5:4217:2001"
schemaLocation="CodeList_CurrencyCode_ISO_7_04.xsd"/>


This implies to me that when we use ATG2 AmountType it will require ISO
4217 currency codes (presumably 2001 version).  From the code set i can
see it is the alphabetic codes that are used.  I dont know what the
_7_04 signifies (i suspect it is the ATG2 versioning system)


In UBL 1.0 we had UBL_AmountType as:

      <xsd:restriction base="udt:AmountType">

        <xsd:attribute name="amountCurrencyID"
type="cur:CurrencyCodeContentType" use="required"/>

        <xsd:attribute name="amountCurrencyCodeListVersionID"
type="xsd:normalizedString" fixed="0.3" use="optional"/>

      </xsd:restriction>

<xsd:import
namespace="urn:oasis:names:specification:ubl:schema:xsd:CurrencyCode-1.0"
schemaLocation="../codelist/UBL-CodeList-CurrencyCode-1.0.xsd"/>


In the code set itself we identified "ISO 4217 Alpha" as the codeListID
and "0.3" as the codeListVersionID.


This leads me to think that to be compatible with UBL 1.0 we don't need
our own Specialized data types for Amount (which for the sake of
consistency we should now be calling Qualified data types).  If we
assume 2001 ISO 4217 is version 0.3 (which i suspect it is) then a UBL
1.0 currency code is still valid in the ATG2 world.


Your comment about "required" seems to be another issue (a request for
change).  Is that correct?



PS this discussion exposes the whole code management problem.  Our 1.0
URL to BSI is now dead and it appears you have to buy the code sets to
see them.  Another good reason to let CEFACT manage these.


Stephen Green wrote:


  As per my action on the last Pacific call, I've looked at the Amount
UDT in the ATG2 NDR (latest sent by Sylvia). It doesn't actually
include the UDT schema but section 9.1.1 reads, of udt:AmountType,

"The element "TotalAmount" is based on the unqualified data type "udt:AmountType":

<xsd:element name="TotalAmount" type="udt:AmountType"/>

The udt:AmountType is declared in the unqualified schema module as:

<xsd:schema targetNamespace="urn:un:unece:uncefact:data:draft:UnqualifiedDataTypeSchemaModule:1.1.A" xmlns:clm54217="urn:un:unece:uncefact:codelist:draft:5:4217:2001" * 
elementFormDefault="qualified" attributeFormDefault="unqualified">
	<!-- ===== Imports                                                 ===== -->
	<!-- =================================================================== -->
	<!-- ===== Imports of Code Lists                                   ===== -->
	<!-- =================================================================== -->
	<xsd:import namespace="urn:un:unece:uncefact:codelist:draft:5:4217:2001" schemaLocation="CodeList_CurrencyCode_ISO_7_04.xsd"/>
	*
	<!-- ===== Type Definitions                                        ===== -->
	<!-- =================================================================== -->
	<!-- ===== Primary RT: Amount. Type                                ===== -->
	<!-- =================================================================== -->
	<xsd:complexType name="AmountType">
		<xsd:simpleContent>
			<xsd:extension base="xsd:decimal">
				<xsd:attribute name="currencyCode" type="clm54217:CurrencyCodeContentType" use="required"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>

This udt:AmountType includes one attribute (supplementary component), which is based on the simple type "clm54217:CurrencyCodeContentType", which comes from the schema module of the code list "ISO 4217". Therefore, the code values of the attribute "currencyCode" are only based on this standardized code list. 
The code list schema module for ISO 4217 is:
..."

so from this I'd say we certainly still need a qdt:UBLAmountType (qdt: or sdt: ?)
and it would differ from the UBL 1.0 sdt:UBLAmountType in that it would
replace the 'fixed="..."' schema attribute for supplementary components 
with, say (I'd suggest), 'default="..."' .



All the best

Steve
Next in thread → Next in month →