Skip to content

Commit 6778f14

Browse files
committed
Moving constraints to publication.xsd
As per @Aurige comment, the following unicity constraints have been moved to NeTEx_publication.xsd: - KeyValuePair - PrivateCodeType - TypeOfValue_Unique SfUniqueLineId was deleted as already a comment in the file.
1 parent 5c955d4 commit 6778f14

File tree

4 files changed

+31
-32
lines changed

4 files changed

+31
-32
lines changed

xsd/NeTEx_publication.xsd

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,23 @@
389389
<xsd:field xpath="@id"/>
390390
<xsd:field xpath="@version"/>
391391
</xsd:key>
392+
<!-- =====KeyValuePair unique============================== -->
393+
<xsd:unique name="KeyValuePair">
394+
<xsd:annotation>
395+
<xsd:documentation>Every Key Value Pair must be unique.</xsd:documentation>
396+
</xsd:annotation>
397+
<xsd:selector xpath=".//netex:KeyValue"/>
398+
<xsd:field xpath="netex:Key"/>
399+
<xsd:field xpath="netex:Value"/>
400+
</xsd:unique>
401+
<!-- =====PrivateCodeType unique============================== -->
402+
<xsd:unique name="PrivateCodeType">
403+
<xsd:annotation>
404+
<xsd:documentation>Every PrivateCode type must be unique.</xsd:documentation>
405+
</xsd:annotation>
406+
<xsd:selector xpath=".//netex:PrivateCode"/>
407+
<xsd:field xpath="@type"/>
408+
</xsd:unique>
392409
<!-- =====ResponsibilityRole============================== -->
393410
<!-- =====ResponsibilityRole unique========================== -->
394411
<xsd:unique name="ResponsibilityRole_UniqueBy_Id_Version">
@@ -600,6 +617,16 @@
600617
<xsd:field xpath="@id"/>
601618
<xsd:field xpath="@version"/>
602619
</xsd:key>
620+
<!-- =====TypeOfValue unique========================== -->
621+
<xsd:unique name="TypeOfValue_Unique">
622+
<xsd:selector xpath="values/TypeOfValue"/>
623+
<xsd:field xpath="@id"/>
624+
</xsd:unique>
625+
<!-- =====TypeOfValue Key========================== -->
626+
<xsd:key name="TypeOfValue_Key">
627+
<xsd:selector xpath="values/TypeOfValue"/>
628+
<xsd:field xpath="@id"/>
629+
</xsd:key>
603630
<!-- =====ValueSet unique========================== -->
604631
<xsd:unique name="ValueSet_UniqueBy_Id_Version">
605632
<xsd:annotation>

xsd/netex_framework/netex_responsibility/netex_responsibility_version.xsd

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
<Date>
2424
<Modified>2017-11-11 Fix allow version of dereived view id</Modified>
2525
</Date>
26-
<Date><Modified>2023-11-07</Modified>CR0544 Add privateCodes.
26+
<Date>
27+
<Modified>2023-11-07</Modified>CR0544 Add privateCodes.
2728
</Date>
2829
<Description>
2930
<p>NeTEx - Network Exchange. This subschema defines RESPONSIBILITY types.</p>
@@ -178,16 +179,6 @@ Rail transport, Roads and Road transport
178179
<xsd:annotation>
179180
<xsd:documentation>A list of alternative Key values for an element.</xsd:documentation>
180181
</xsd:annotation>
181-
<!-- 1.02 correction ======================================= -->
182-
<xsd:unique name="KeyValuePair">
183-
<xsd:annotation>
184-
<xsd:documentation>Every Key Value Pair must be unique.</xsd:documentation>
185-
</xsd:annotation>
186-
<xsd:selector xpath=".//netex:KeyValue"/>
187-
<xsd:field xpath="netex:Key"/>
188-
<xsd:field xpath="netex:Value"/>
189-
</xsd:unique>
190-
<!-- END correction ======================================= -->
191182
</xsd:element>
192183
<xsd:complexType name="KeyListStructure">
193184
<xsd:annotation>
@@ -228,13 +219,6 @@ Rail transport, Roads and Road transport
228219
<xsd:annotation>
229220
<xsd:documentation>A list of private codes that uniquely identifiy the element. May be used for inter-operating with other (legacy) systems. +v2.0</xsd:documentation>
230221
</xsd:annotation>
231-
<xsd:unique name="PrivateCodeType">
232-
<xsd:annotation>
233-
<xsd:documentation>Every PrivateCode type must be unique.</xsd:documentation>
234-
</xsd:annotation>
235-
<xsd:selector xpath=".//netex:PrivateCode"/>
236-
<xsd:field xpath="@type"/>
237-
</xsd:unique>
238222
</xsd:element>
239223
<xsd:complexType name="PrivateCodesStructure">
240224
<xsd:annotation>

xsd/netex_framework/netex_responsibility/netex_typeOfValue_version.xsd

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
<Date>
2121
<Modified>217-03-27 Change to use responsibility 1.1 with AlternativeText</Modified>
2222
</Date>
23-
<Date><Modified>2023-11-07</Modified>CR0544 Deprecate PrivateCode.
23+
<Date>
24+
<Modified>2023-11-07</Modified>CR0544 Deprecate PrivateCode.
2425
</Date>
2526
<Description>
2627
<p>NeTEx - Network Exchange. This subschema defines TYPE OF VALUE types.</p>
@@ -175,14 +176,6 @@ Rail transport, Roads and Road transport
175176
</xsd:restriction>
176177
</xsd:complexContent>
177178
</xsd:complexType>
178-
<xsd:unique name="TypeOfValue_Unique">
179-
<xsd:selector xpath="values/TypeOfValue"/>
180-
<xsd:field xpath="@id"/>
181-
</xsd:unique>
182-
<xsd:key name="TypeOfValue_Key">
183-
<xsd:selector xpath="values/TypeOfValue"/>
184-
<xsd:field xpath="@id"/>
185-
</xsd:key>
186179
</xsd:element>
187180
<xsd:complexType name="ValueSet_VersionStructure">
188181
<xsd:annotation>

xsd/netex_part_2/part2_frames/netex_serviceFrame_version.xsd

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,6 @@ Rail transport, Roads and Road transport
126126
</xsd:restriction>
127127
</xsd:complexContent>
128128
</xsd:complexType>
129-
<!--
130-
<xsd:unique name="SfUniqueLineId">
131-
<xsd:selector xpath=".//netex:lines/Line"/>
132-
<xsd:field xpath="Id"/>
133-
</xsd:unique> -->
134129
</xsd:element>
135130
<xsd:complexType name="Service_VersionFrameStructure">
136131
<xsd:annotation>

0 commit comments

Comments
 (0)