identity-constraints as part of metadata
Currently the code generation is able to add meta data at this level;
@dataclass
class StopPlaceRef(StopPlaceRefStructure):
"""
Reference to a STOP PLACE.
"""
class Meta:
namespace = "http://www.netex.org.uk/netex"
From my XSD I know there is a constraint like below. Now we know that the reference for a StopPlaceRef would point to the selector StopPlace. Would it be possible to add the fact that the selector is of type StopPlace as part of the metadata?
<!-- =====StopPlace Key ========================== -->
<xsd:keyref name="StopPlace_KeyRef" refer="netex:StopPlace_AnyVersionedKey">
<xsd:selector xpath=".//netex:StopPlaceRef | .//netex:AdjacentStopPlaceRef"/>
<xsd:field xpath="@ref"/>
<xsd:field xpath="@version"/>
</xsd:keyref>
<xsd:key name="StopPlace_AnyVersionedKey">
<xsd:selector xpath=".//netex:StopPlace"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:key>
In my ideal world the relationship is resolved to the foreign object referred transparantly. But even something as 'getRef()' would be very cool.
Not really sure, what this is about, please add an api examle or something...
I am doing spring cleaning and trying to reduce the number of open issues.
I am closing this one for now, @skinkie