-
Notifications
You must be signed in to change notification settings - Fork 45
Filter current NeTEx_publication for elements that do not exists in t… #960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
ue71603
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An MD file is needed to explain what is in the scripts folder. It should tell, what the script is doing.
ue71603
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So things like
<!-- =====GroupOfServicesMember Key ========================== -->
<xsd:keyref name="GroupOfServicesMember_KeyRef" refer="netex:GroupOfServicesMember_AnyVersionedKey_ordered">
<xsd:selector xpath=".//netex:GroupOfServicesMemberRef"/>
<xsd:field xpath="@ref"/>
<xsd:field xpath="@version"/>
</xsd:keyref>
<xsd:key name="GroupOfServicesMember_AnyVersionedKey_ordered">
<xsd:selector xpath=".//netex:GroupOfServicesMember"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:key>
<!-- =====JourneyFrequencyGroup============================== -->
<!-- =====JourneyFrequencyGroup unique========================== -->
<xsd:unique name="JourneyFrequencyGroup_UniqueBy_Id_Version">
<xsd:annotation>
<xsd:documentation>Every [JourneyFrequencyGroup Id + Version] must be unique within document.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath=".//netex:JourneyFrequencyGroup"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:unique>
don't exist in the XSD? Is this really so or was something not merged into the XSD?
ue71603
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better example:
<!-- =====ParkingAreaCapacityAssignment=========================== -->
<!-- =====ParkingAreaCapacityAssignment unique========================== -->
<xsd:unique name="ParkingAreaCapacityAssignment_UniqueBy_Id_Version_Order">
<xsd:annotation>
<xsd:documentation>Every [ParkingAreaCapacityAssignment Id + Version + order] must be unique within document.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath=".//netex:ParkingAreaCapacityAssignment"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:unique>
<!-- =====ParkingAreaCapacityAssignment Key ========================== -->
<xsd:keyref name="ParkingAreaCapacityAssignment_KeyRef" refer="netex:ParkingAreaCapacityAssignment_AnyVersionedKey">
<xsd:selector xpath=".//netex:ParkingAreaCapacityAssignmentRef"/>
<xsd:field xpath="@ref"/>
<xsd:field xpath="@version"/>
</xsd:keyref>
<xsd:key name="ParkingAreaCapacityAssignment_AnyVersionedKey">
<xsd:selector xpath=".//netex:ParkingAreaCapacityAssignment"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:key>
Here you see that both selectors never exists in the schema. GroupOfServicesMember exists, but GroupOfServicesMemberRef does not. Hence the relationship does not make sense, there is nothing to check for so the constraint is removed. |
As requested by @thbar script and executed code to compare.
This code checks NeTEx_publication.xsd for selectors (xpath) that do not exist in the XML Schema at all. This is hygiene.