defectTimetable.xml 7.12 KiB
<?xml version="1.0" encoding="UTF-8"?>
  <!-- $Id$ -->
  <!-- Purpose of this file is to show correct validation of xs:keyref-constrained references -->
  <!-- Currently the file schema/timetable.xsd contains 31 xs:keyref definitions -->
  <!-- This file produces 31 identity-constraint-errors -->
<rail:railml xmlns:rail="http://www.railml.org/schemas/2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.railml.org/schemas/2011 ../schema/railML.xsd " version="2.1">
  <rail:infrastructure id="i1">
  	<rail:tracks>
  		<rail:track id="trc1">
  			<rail:trackTopology>
  				<rail:trackBegin id="tb1" pos="0">
  					<rail:openEnd id="oe1"/>
  				</rail:trackBegin>
  				<rail:trackEnd id="te1" pos="100">
  					<rail:openEnd id="oe2"/>
  				</rail:trackEnd>
  			</rail:trackTopology>
  		</rail:track>
  	</rail:tracks>
  	<rail:trackGroups>
  		<rail:line id="l1">
  			<rail:trackRef ref="trc1"/>
  		</rail:line>
  	</rail:trackGroups>
    <rail:operationControlPoints>
      <rail:ocp id="o1"/>
    </rail:operationControlPoints>
  </rail:infrastructure>
  <rail:rollingstock id="rs1">
    <rail:vehicles>
      <rail:vehicle id="v1" />
    </rail:vehicles>
    <rail:formations>
      <rail:formation id="f1">
        <rail:trainOrder>
          <rail:vehicleRef orderNumber="1" vehicleRef="v1" />
        </rail:trainOrder>
      </rail:formation>
    </rail:formations>
  </rail:rollingstock>
  <rail:timetable id="t1">
    <rail:timetablePeriods>
      <rail:timetablePeriod id="ttp1" />
    </rail:timetablePeriods>
    <rail:operatingPeriods>
      <rail:operatingPeriod id="op1" timetablePeriodRef="t1">
        <!-- correct value for attribute 'timetablePeriodRef' would be 'ttp1', validation should show this error -->
      </rail:operatingPeriod>
    </rail:operatingPeriods>
    <rail:categories>
      <rail:category id="c1" />
    </rail:categories>
    <rail:trainParts>
      <rail:trainPart id="tp1" timetablePeriodRef="t1" categoryRef="t1">
        <!-- correct value for attribute 'timetablePeriodRef' would be 'ttp1', validation should show this error -->
        <!-- correct value for attribute 'categoryRef' would be 'c1', validation should show this error -->
        <rail:formationTT formationRef="t1">
          <!-- correct value for attribute 'formationRef' would be 'f1', validation should show this error -->
          <rail:reservationInfo>
            <rail:booking bookingNumber="1" vehicleRef="t1" />
            <!-- correct value for attribute 'vehicleRef' would be 'v1', validation should show this error -->
          </rail:reservationInfo>
        </rail:formationTT>
        <rail:operatingPeriodRef ref="t1">
          <!-- correct value for attribute 'ref' would be 'op1', validation should show this error -->
        </rail:operatingPeriodRef>
        <rail:ocpsTT>
          <rail:ocpTT ocpRef="op1" trackRef="t1">
          	<!-- correct value for attribute 'ocpRef' would be 'o1', validation should show this error -->
          	<!-- correct value for attribute 'trackRef' would be 'trc1', validation should show this error -->
7172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
<rail:connections> <rail:connection trainRef="t1" ocpRef="op1" trainPartRef="t1"/> <!-- correct value for attribute 'trainRef' would be 'tr1', validation should show this error --> <!-- correct value for attribute 'ocpRef' would be 'o1', validation should show this error --> <!-- correct value for attribute 'trainPartRef' would be 'tp1', validation should show this error --> </rail:connections> <rail:sectionTT lineRef="t1"> <!-- correct value for attribute 'lineRef' would be 'l1', validation should show this error --> <rail:trackRef ref="t1"/> <!-- correct value for attribute 'ref' would be 'trc1', validation should show this error --> </rail:sectionTT> <rail:stopDescription operatingPeriodRef="o1"/> <!-- correct value for attribute 'operatingPeriodRef' would be 'op1', validation should show this error --> </rail:ocpTT> </rail:ocpsTT> </rail:trainPart> </rail:trainParts> <rail:trains> <rail:train id="tr1" type="operational"> <rail:trainPartSequence sequence="1" categoryRef="t1"> <!-- correct value for attribute 'categoryRef' would be 'c1', validation should show this error --> <rail:trainPartRef ref="t1" /> <!-- correct value for attribute 'ref' would be 'tp1', validation should show this error --> </rail:trainPartSequence> </rail:train> </rail:trains> <rail:trainGroups> <rail:trainGroup id="tg1"> <rail:trainRef ref="t1" sequence="1" /> <!-- correct value for attribute 'ref' would be 'tr1', validation should show this error --> </rail:trainGroup> </rail:trainGroups> <rail:rosterings> <rail:rostering id="r1" vehicleRef="t1" formationRef="t1"> <!-- correct value for attribute 'vehicleRef' would be 'v1', validation should show this error --> <!-- correct value for attribute 'formationRef' would be 'f1', validation should show this error --> <rail:blockParts> <rail:blockPart id="bp1" trainPartRef="t1" operatingPeriodRef="t1" vehicleRef="t1" formationRef="t1" startOcpRef="op1" endOcpRef="op1"> <!-- correct value for attribute 'trainPartRef' would be 'tp1', validation should show this error --> <!-- correct value for attribute 'operatingPeriodRef' would be 'op1', validation should show this error --> <!-- correct value for attribute 'vehicleRef' would be 'v1', validation should show this error --> <!-- correct value for attribute 'formationRef' would be 'f1', validation should show this error --> <!-- correct value for attribute 'startOcpRef' would be 'o1', validation should show this error --> <!-- correct value for attribute 'endOcpRef' would be 'o1', validation should show this error --> </rail:blockPart> </rail:blockParts> <rail:blocks> <rail:block id="b1"> <rail:blockPartSequence sequence="1" basicBlockRef="t1"> <!-- correct value for attribute 'basicBlockRef' would be 'b1', validation should show this error --> <rail:blockPartRef ref="t1" /> <!-- correct value for attribute 'ref' would be 'bp1', validation should show this error --> </rail:blockPartSequence> </rail:block> </rail:blocks> <rail:circulations> <rail:circulation blockRef="t1" nextBlockRef="t1" operatingPeriodRef="t1" nextOperatingPeriodRef="t1" /> <!-- correct value for attribute 'blockRef' would be 'b1', validation should show this error --> <!-- correct value for attribute 'nextBlockRef' would be 'b1', validation should show this error --> <!-- correct value for attribute 'operatingPeriodRef' would be 'op1', validation should show this error --> <!-- correct value for attribute 'nextOperatingPeriodRef' would be 'op1', validation should show this error --> </rail:circulations> </rail:rostering> </rail:rosterings> </rail:timetable> </rail:railml>