Filter current NeTEx_publication for elements that do not exists in t…#960
Open
Filter current NeTEx_publication for elements that do not exists in t…#960
Conversation
ue71603
requested changes
Oct 6, 2025
Contributor
ue71603
left a comment
There was a problem hiding this comment.
An MD file is needed to explain what is in the scripts folder. It should tell, what the script is doing.
ue71603
reviewed
Oct 8, 2025
Contributor
ue71603
left a comment
There was a problem hiding this comment.
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
requested changes
Oct 8, 2025
Contributor
ue71603
left a comment
There was a problem hiding this comment.
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>
Contributor
Author
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.