Conversation
|
I approved this fix since it makes sense, but it may have some consequences on existing datasets (but quite unlikely since Equipment or not widely used yet) |
|
Hopefully I am not missing something here, but from what I can see in the XSD this bug fix will only allow for references previously not part of the placeEquipments refenece substitution (InstalledEquipmentRef), i.e. the AccessEquipmentRef subtypes. The element types themselves where already correctly of InstalledEquipment substitution type. On the other hand: In order to align with the UML/spec, it seems these references should more appropriately have been of a PlaceEquipment(Ref) substitution group. |
|
@syversenkr I did not find a PlaceEquipmentStructure did you?, |
|
No, it is not yet added. A technical shortcut when implementing, I presume. I believe there are similar technical simplifications elsewhere in the code, if we want to reflect this particular additional layer I can add it to the branch. |
I am checking SiteEquipmentRef and SignEquipmentRef which have exactly the same problem. <xsd:element name="SiteEquipmentRef" type="SiteEquipmentRefStructure" substitutionGroup="EquipmentRef"> So the question is, should we create the PlaceEquipment as substitution? |
|
Commit 047c548: PlaceEquipment substitution type: However, the additional incorrect references with substitution group Equipment should be fixed as part of this commit. |
| </xsd:group> | ||
| <!-- ====ACCESS=================================================================== --> | ||
| <xsd:element name="AccessEquipment" type="AccessEquipment_VersionStructure" substitutionGroup="InstalledEquipment"> | ||
| <xsd:element name="AccessEquipment" type="AccessEquipment_VersionStructure" abstract="true" substitutionGroup="InstalledEquipment"> |
There was a problem hiding this comment.
What does this 'abstract' mean? "Optional. Specifies whether the element can be used in an instance document. True indicates that the element cannot appear in the instance document. Instead, another element whose substitutionGroup attribute contains the qualified name (QName) of this element must appear in this element's place. Default is false"
There was a problem hiding this comment.
see comment above
This is inherently abstract per type implementation, practical implication is that currently you can add AccessEquipment as a list element (and it is proposed as a code completion option in e.g. oXygen and XMLspy), but if you do add an explicit AccessEquipment element rather than one of its implementable subtypes you get a validation error.
|
@nick-knowles can you comment on the question @syversenkr raises? |
|
The question being: Should we create the PlaceEquipment as substitution to align with the UML model? Or keep the simpler implementation, skipping abstract types when it does not have a practical implication? |
I would keep it simple |
|
I think the only practical implementation this will have is if we are to be generating UML diagrams from the XSD, it must be modeled. |
|
I suggest we are going to do PlantUML, hence do it via the long way. |
|
The AccessEquipment should also be abstract (not just the AccessEquipmentRef) |
|
XML has some almost unfathomable extra restrictions on type substitution, so it is not always possible to simply encode the UML. |
|
@skinkie This is still blocked? |
Not blocked, but a suggestion what a solution would be, would be appreciated. I am happy to add abstract=true to all the blue classes. |
|
@Aurige @nick-knowles : Could you give your opinion to Stefan? |
|
yes according to the UML they look abstract |
| <xsd:documentation>Type for a reference to an ACCESS EQUIPMENT.</xsd:documentation> | ||
| </xsd:annotation> | ||
| <xsd:simpleContent> | ||
| <xsd:restriction base="EquipmentRefStructure"> |
| <xsd:documentation>Type for a reference to an ACCESS EQUIPMENT.</xsd:documentation> | ||
| </xsd:annotation> | ||
| <xsd:simpleContent> | ||
| <xsd:restriction base="EquipmentRefStructure"> |
| </xsd:sequence> | ||
| </xsd:group> | ||
| <!-- ====ACCESS=================================================================== --> | ||
| <xsd:element name="AccessEquipment" type="AccessEquipment_VersionStructure" substitutionGroup="InstalledEquipment"> |
| </xsd:sequence> | ||
| </xsd:group> | ||
| <!-- ====ACCESS=================================================================== --> | ||
| <xsd:element name="AccessEquipment" type="AccessEquipment_VersionStructure" substitutionGroup="InstalledEquipment"> |
| <xsd:restriction base="InstalledEquipmentRefStructure"> | ||
| <xsd:attribute name="ref" type="AccessEquipmentIdType" use="required"> | ||
| <xsd:annotation> | ||
| <xsd:documentation>Identifier of a TICKETING EQUIPMENT.</xsd:documentation> |
There was a problem hiding this comment.
wrong in master. This some documentation change should be done.
| <xsd:restriction base="InstalledEquipmentRefStructure"> | ||
| <xsd:attribute name="ref" type="AccessEquipmentIdType" use="required"> | ||
| <xsd:annotation> | ||
| <xsd:documentation>Identifier of a TICKETING EQUIPMENT.</xsd:documentation> |
There was a problem hiding this comment.
wrong in master. This some documentation change should be done.
| </xsd:annotation> | ||
| <xsd:restriction base="InstalledEquipmentIdType"/> | ||
| </xsd:simpleType> | ||
| <xsd:element name="AccessEquipmentRef" type="AccessEquipmentRefStructure" substitutionGroup="EquipmentRef"> |
There was a problem hiding this comment.
This is new. It currently works with EquipmentRef (as this is the more generalized class). However, to be very in line, whe should probably keep this change. How pedantic do we want to be.
| </xsd:annotation> | ||
| <xsd:restriction base="InstalledEquipmentIdType"/> | ||
| </xsd:simpleType> | ||
| <xsd:element name="AccessEquipmentRef" type="AccessEquipmentRefStructure" substitutionGroup="EquipmentRef"> |
There was a problem hiding this comment.
This is new. It currently works with EquipmentRef (as this is the more generalized class). However, to be very in line, whe should probably keep this change. How pedantic do we want to be.
There was a problem hiding this comment.
https://github.com/NeTEx-CEN/NeTEx/pull/293/files contains an example. Therefore it should break master, if we have a problem there.
ue71603
left a comment
There was a problem hiding this comment.
Changing <xsd:element name="AccessEquipmentRef" type="AccessEquipmentRefStructure" substitutionGroup="EquipmentRef"> we should consider. Correcting the documentation TICKETING to ACCESS. The rest should be thrown out.
* Fix AccessEquipmentRef Fix TransmodelEcosystem#167 * Should be abstract as this element cannot be implemented (only its subtypes can) * Honest attempt to change the model to the UML description. Co-authored-by: Kristian Syversen <kristian.syversen@entur.org>
* Fix AccessEquipmentRef Fix TransmodelEcosystem#167 * Should be abstract as this element cannot be implemented (only its subtypes can) * Honest attempt to change the model to the UML description. Co-authored-by: Kristian Syversen <kristian.syversen@entur.org>


Fix #167
(see issue, for documentation)