[eml-dev] [Bug 3480] - duplicate distribution types (in resource.xsd, and physical.xsd)
bugzilla-daemon at ecoinformatics.org
bugzilla-daemon at ecoinformatics.org
Tue Nov 4 15:05:15 PST 2008
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3480
------- Comment #7 from mob at icess.ucsb.edu 2008-11-04 15:05 -------
In eml201, these two types were slightly different, with the similar chunks of
code copied from one to the other. Extending the res:DistributionType (comment
#2) wont do the job. Here is another option that makes components reusable, but
each keeps each type distinct and their differences can be explained in the
documentation.
1. define some additional types in resourcs.xsd:
res:OfflineType, res:OnlineType (which are analogous to the existing,
res:InlineType).
res:ConnectionType (contains the already-defined ConnectionDefinitionTYpe, plus
some optional overrides)
res:OnlineType, phys:PhysicalOnlineType
2 online Types are required because in the resource group, it needs be be
allowed to have a child connectionDefintion (see comment #6, r1.62)
2. build res:DistributionType and phys:PhysicalDistributionType from these,
plus acc:AccessType. See below. This way, the basic use of each Type can be
put into the annotation under it's complexType description, and the intended
use at the resource or physical level can go into the instance elements.
in eml-resource.xsd:
<xs:complexType name="DistributionType">
<xs:choice>
<xs:choice>
<xs:element name="online" type="OnlineType"/>
<xs:element name="offline" type="OfflineType"/>
<xs:element name="inline" type="InlineType"/>
</xs:choice>
<xs:group ref="ReferencesGroup"/>
</xs:choice>
<xs:attribute name="id" type="IDType" use="optional"/>
<xs:attribute name="system" type="SystemType" use="optional"/>
<xs:attribute name="scope" type="ScopeType" use="optional"
default="document"/>
</xs:complexType>
in eml-physical.xsd
<xs:complexType name="PhysicalDistributionType">
<xs:sequence>
<xs:choice>
<xs:choice>
<xs:element name="online" type="PhysicalOnlineType"/>
<xs:element name="offline" type="res:OfflineType"/>
<xs:element name="inline" type="res:InlineType"/>
</xs:choice>
<xs:group ref="res:ReferencesGroup"/>
</xs:choice>
<xs:element name="access" type="acc:AccessType" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="res:IDType" use="optional"/>
<xs:attribute name="system" type="res:SystemType" use="optional"/>
<xs:attribute name="scope" type="res:ScopeType" use="optional"
default="document"/>
</xs:complexType>
More information about the Eml-dev
mailing list