Skip to content
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

Mutually exclusive attributes (for version and versionRef) #773

Open
skinkie opened this issue Sep 4, 2024 · 3 comments
Open

Mutually exclusive attributes (for version and versionRef) #773

skinkie opened this issue Sep 4, 2024 · 3 comments
Labels
enhancement non semantic enhacement: technical enhancement, etc. group_decision_needed
Milestone

Comments

@skinkie
Copy link
Contributor

skinkie commented Sep 4, 2024

https://stackoverflow.com/questions/33748490/how-to-define-mutually-exclusive-attributes-in-xsd

@skinkie
Copy link
Contributor Author

skinkie commented Sep 4, 2024

This may work when applied to every unique ref-element, but not at the top level (NeTEx_publication.xsd) hence cannot be disabled. Why? Because the constraint may only be applied on the local element (like the uniqueness of the key in the key-value-list).

diff --git a/xsd/netex_part_1/part1_tacticalPlanning/netex_servicePattern_support.xsd b/xsd/netex_part_1/part1_tacticalPlanning/netex_servicePattern_support.xsd
index d1ef9e63..9a78af18 100644
--- a/xsd/netex_part_1/part1_tacticalPlanning/netex_servicePattern_support.xsd
+++ b/xsd/netex_part_1/part1_tacticalPlanning/netex_servicePattern_support.xsd
@@ -82,6 +82,10 @@ Rail transport, Roads and Road transport
                <xsd:annotation>
                        <xsd:documentation>Reference to a SCHEDULED STOP POINT.</xsd:documentation>
                </xsd:annotation>
+           <xsd:key name="ScheduledStopPointRefVersionRequired">
+               <xsd:selector xpath="."/>
+               <xsd:field xpath="@version|@versionRef"/>
+           </xsd:key>
        </xsd:element>
        <xsd:complexType name="ScheduledStopPointRefStructure">
                <xsd:annotation>

@skinkie skinkie added the enhancement non semantic enhacement: technical enhancement, etc. label Sep 4, 2024
@skinkie
Copy link
Contributor Author

skinkie commented Sep 4, 2024

We would need to discuss we would do it, or can it be done automatically, but I think the above would significantly help the missing element situation.

@Aurige
Copy link
Contributor

Aurige commented Oct 29, 2024

Keep this discussion opened and try to find proposal for next milestone (2.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement non semantic enhacement: technical enhancement, etc. group_decision_needed
Projects
None yet
Development

No branches or pull requests

5 participants