NeTEx-CEN / NeTEx

NeTEx is a CEN Technical Standard for exchanging Public Transport schedules and related data.
http://netex-cen.eu
GNU General Public License v3.0
78 stars 39 forks source link

Explicit nameOfRefClass check #668

Open skinkie opened 5 months ago

skinkie commented 5 months ago

I think we must be able to generated a list of values that should be usable as nameOfRefClass, so we can prevent typo's here. I would love to see some sort of reusable enumeration which also could be used within TypeOfFrame.

Related to #650

Suggestion: creating 'inception' by adding the entire Class list in here?

        <xsd:simpleType name="NameOfClass">
                <xsd:annotation>
                        <xsd:documentation>Type for name of a class of an ENTITY.</xsd:documentation>
                </xsd:annotation>
                <xsd:restriction base="xsd:Name"/>
        </xsd:simpleType>
ue71603 commented 3 months ago

@skinkie frankly not quite clear, what I should do.

skinkie commented 3 months ago

What we should do is the question. If we take all the classes in NeTEx and would add them here as an enumeration, it would give the ability to check the correct usage of nameOfRefClass. But once a class is added, it must be added here too. If we want to be more specific nameOfRefClass might also be limited based on the elements that can be used to refer. This would require a per Ref-element list of potential classes (and hopefully a default).

skinkie commented 2 months ago

Also include FrameClassRef and ClassInFrameRef.

<FrameClassRef nameOfClass="CompositeFrame"/>
<ClassInFrameRef nameOfClass="DataManagedObject">Use Common definitions</ClassInFrameRef>