Home » railML newsgroups » railML.infrastructure » InfraAttributes and InfraAttrGroups (Can InfraAttributes and InfraAttrGroups be used by other elements than tracks?)
InfraAttributes and InfraAttrGroups [message #1396] Mon, 15 August 2016 12:12 Go to previous message
Christoph Jobmann is currently offline  Christoph Jobmann
Messages: 2
Registered: August 2016
Junior Member
Greetings,

I recently started looking into the infrastructure subschema.

As far as I can tell the element InfraAttrGroup and thereby the underlying InfraAttributes elements can only be references by track elements. That makes sense considering that most infraAttributes children are strongly connected to tracks.

Are there similar elements that can be used for the elements of type ocp? If not - are there plans to add them?
For now I see three ways to add information I would rather wrap up in some kind of attribute Containers:

  1. Use the regular extension Point and add an element for referencing infraAttributes Element
  2. Use the "other" extension point and add references as user-defined attributes or elements.
  3. Add a trackref pointing to a dummy track that contains an appropriate attributeGroupRefs element

I prefer the first option, even though it has the downside that it enables connecting an ocp with attributes that only make sense for tracks.
The second option has the downside that the generalInfraAttribute Elements can not be used anymore.
The third option is not really an option from my point of view - but it is the only way I see without adding new user-defined elements or attributes.

I made up an example where the options are demonstrated and hope that they help understanding my point. Extensions are marked by a NEW: prefix.

<railml>
  <metadata>
    <infrastructureManager id="im1" name="DB Netz AG"/>
  </metadata>
  <infrastructure id="i">
    <infraAttrGroups>
      <infraAttributes id="ia1">
        <owner infrastructureManagerRef="im1"/>
      </infraAttributes>
      <infraAttributes id="ia2">
        <generalInfraAttributes>
          <generalInfraAttribute>
            <attributes>
              <attribute name="myNewAttribute" value="42"/> 
            </attributes>
          </generalInfraAttribute>
        </generalInfraAttributes>
      </infraAttributes>
    </infraAttrGroups>
    <tracks>
      <track id="dummy1">
        <infraAttrGroupRefs>
          <infraAttrGroupRef ref="ia1"/>
          <infraAttrGroupRef ref="ia2"/>
        </infraAttrGroupRefs>
      </track>
    </tracks>
    <operationControlPoints>
      <ocp id="ocp1">
        <!-- Option 1 -->
        <NEW:infraAttrGroupRefs>
          <NEW:infraAttrGroupRef ref="ia1"/>
          <NEW:infraAttrGroupRef ref="ia2"/>
        </NEW:infraAttrGroupRefs>
      </ocp>
      <ocp id="ocp2" NEW:OwnerRef="im1">
        <!-- Option 2 -->
        <NEW:myNewAttribute value="42"/>
      </ocp>
      <ocp id="ocp3">
        <!-- Option 3 -->
        <propEquipment>
          <trackRef ref="dummy1">
        </propEquipment>
      </ocp>
    </operationControlPoints>
  </infrastructure>
</railml>


Am I missing something? Which way is considered as best, are there other ways?

Kind regards
Christoph Jobmann
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: [railML3|alpha] Remarks on example_tiny_v02.xml of v0.is3
Next Topic: [railML3|alpha] Empty <choice/> in RTM_ElementPartCollection
Goto Forum:
  


Current Time: Fri Apr 26 00:28:26 CEST 2024