Here is a little more information on this topic.

The schema for v9 (released at SIW) has, in part, definitions of PersonType and VehicleType (two types of entities) like this:
<xs:complexType name="PersonType">
<xs:sequence>
...
<xs:element ref="EntityType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="UUID" minOccurs="1" maxOccurs="1"/>
<xs:element ref="Name" minOccurs="0" maxOccurs="1"/>
<xs:element ref="CurrentState" minOccurs="0" maxOccurs="1"/>
<xs:element ref="PersonTypeCategoryCode" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Marking" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="VehicleType">
<xs:sequence>
...
<xs:element ref="EntityType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="UUID" minOccurs="1" maxOccurs="1"/>
<xs:element ref="Name" minOccurs="0" maxOccurs="1"/>
<xs:element ref="VehicleTypeCategoryCode" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>

where
<xs:element name="Name" type="NameType"/>

<xs:simpleType name="NameType">
<xs:restriction base="xs:string"/>
</xs:simpleType>

So objects of type PersonType and VehicleType both have elements called Name. These both have the same meaning: a string defining the name. The elements come from the property hasName in the ontology. The objects also both have UUIDs and EntityTypes.
The alternative is to define different properties like hasPersonName and hasVehicleName in the ontology. Name is used for over 25 classes, and each would require a different property name. Using the same rules, we would need hasPersonUUID, hasVehicleUUID, hasPersonEntityType, and hasVehicleEntityType, etc.
The current implementation of the ontology->schema translation has actually gone down the code reuse path in order to simplify the inheritance of properties by subclasses. Person and Vehicle objects are subclasses of Entities, and the properties of Entities have been collected in a group:
<xs:group name="EntityGroup">
...
<xs:sequence>
<xs:element ref="EntityType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="UUID" minOccurs="1" maxOccurs="1"/>
<xs:element ref="Name" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:group>

And so a PersonType is actually defined as
<xs:complexType name="PersonType">
<xs:sequence>
...
<xs:group ref="EntityGroup"/>
<xs:element ref="CurrentState" minOccurs="0" maxOccurs="1"/>
<xs:element ref="PersonTypeCategoryCode" minOccurs="0" maxOccurs="1"/>
<xs:element ref="Marking" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>

VehicleType reuses the same group.

* * *
Now my opinion:
My opinion is that we should keep the current design.
- Using the same name for repeated use of a property with the same semantics indicates that these are the same property; using different names for the same property obfuscates their meaning.
- The same code can be used to parse all the elements with these elements.

Doug Reece

On Tue, Oct 8, 2019 at 11:13 PM Mark Pullen <[log in to unmask]> wrote:
An implementer has found it confusing to parse the current XML schema derived from ontology properties that result in XML elements with non-unique names. It would not be hard to make all element names unique to avoid this. However, there is a counter-argument that repeated names allow re-use of software that deals with them. If you have a strong inclination for or against duplicate names in the ontology, please reply to this email.

Mark

########################################################################

To unsubscribe from the SAC-PDG-PSG-C2SIM list, click the following link:
https://discussions.sisostds.org/index.htm?SUBED1=SAC-PDG-PSG-C2SIM&A=1


--

Dr. Douglas Reece |  Principal Engineer
VT MÄK  | 150 Cambridge Park Drive, Third Floor, Cambridge, MA 02140
T: +1.857.209.3483  | 
[log in to unmask]  |  www.mak.com

  



To unsubscribe from the SAC-PDG-PSG-C2SIM list, click the following link:
https://discussions.sisostds.org/index.htm?SUBED1=SAC-PDG-PSG-C2SIM&A=1