Dev:Extending railML

From railML 3 Wiki
Revision as of 14:54, 30 May 2022 by RailML Coord Documentation (talk | contribs) (Created page with "{{head|Extending {{rml}}}} There exists a wide range of means to extend XML Schemas. As {{rml}} is intended for collaboration with other parties, there is a frame of rules to...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Extending railML®
 

There exists a wide range of means to extend XML Schemas. As railML® is intended for collaboration with other parties, there is a frame of rules to be considered on when and how to extend the railML® schema. If your extension does not fit into this frame this may bar the certification of your tool.

Considering #when to extend the schema follows very similar lines throughout all railML® versions.

Considering #how to extend the schema, there has been a major shift between, on the one hand, railML® 2 plus railML® 3.1, and on the other hand railML® 3.2.

When to extend the schema and what to respect before starting?

If you intend to define a new element, attribute or enumeration value or redefine an existing one, please, research carefully, whether a solution to your data exchange problem already exists. As data interoperability is the core aim of railML®, analogous data content within analogous use cases shall be exchanged in the same element and attribute. Therefore we have to avoid duplications, as they tend to make data incomprehensive and cause avoidable efforts. Interfaces with such duplicates will not be certified and will therefore generally be excluded from data exchange. To avoid this please respect the following rules in ascending order:

  • Read this wiki and examine the schema carefully whether there exists a solution already. If you're not sure please contact the responsible scheme coordinator (link to the railML® website).
  • Publish your intention in the railML-Forum (link to the railML® website). This has two advantages for you:
  1. If the element already exists, the redundancy will very likely get apparent before you have taken too much effort.
  2. The community can support you. Maybe others have the same demand and a new railML element or attribute can be added to the scheme.

Please, pay attention to our guideline for participating in the development process in addition.

How to extend the schema

'Up to railML® 3.1, the proposed means of extending railML® to your needs were the <xs:any>-element for defining new elements, the <xs:anyAttribute>-element for defining new attributes ans the generic type tOtherEnumerationValue for defining new enumeration values in designated places. Please, read Dev:usingAny for explanations.

Beginning with railML® 3.2, the proposed solution is to employ the xsi:type attribute to introduce extensions to the released railML® core. Please, read Dev:using xsi:type.