[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: [ubl-comment] Schema type generation and type reuse question
In reviewing the Schemas that were generated I was surprised to see the
redefinition of complexTypes for the various address and party types. For
instance:
<xsd:element name="Address" type="AddressType"/>
<xsd:complexType name="AddressType" id="UBL000028">
<xsd:element name="DeliverToAddress" type="DeliverToAddressType"/>
<xsd:complexType name="DeliverToAddressType" id="UBL000145">
<xsd:element name="JurisdictionAddress" type="JurisdictionAddressType"/>
<xsd:complexType name="JurisdictionAddressType" id="UBL000309">
and there are others.
It seems that the only thing that really changes is the description of
elements in the different aggregates, but from what I see the "address"
content stays the same. I would have expected to see something like this:
<xsd:element name="Address" type="AddressType"/>
<xsd:complexType name="AddressType" id="UBL000028">
<xsd:element name="DeliverToAddress" type="AddressType" id="UBL000145"/>
<xsd:element name="JurisdictionAddress" type="AddressType" id="UBL000309"/>
Was the previous sample what was really intended to be generated as the
final schema? I see how it helps in the mapping of the definitions of all
the various types of address, but it really complicates the final
implementation when you have (in my sample) 3 different definitions of the
same complexType, rather than reuse or extension of the basic AddressType.
With this schema I loose the connection between these similar/exact types,
just to maintain documentation and mapping back to the spreadsheet. Maybe
the complexType definition of AddressType could gather all the
documentation together with something that indicates, when part of
JurisdictionAddress, this means, X, and when part of DeliverToAddress this
means Y.
Comments?
..dan
-------------------------------------------------------
Danny Vint
ACORD 1 Blue Hill Plaza
PO Box 1529
dvint@acord.org Pearl River, NY 10965
http://www.acord.org
Voice:510:522-4703
FAX: 801-749-3229
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC