Template:Constraint

From railML 2 Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Usage

This template standardizes the declaration of constraints. It became necessary to process the default values.

Parameters

The template has 4 unnamed Parameters and a named one:

  1. The attribute name to which the constraint applies
  2. xsd for standard types like string and boolean resp. rml for generic railML® types like tGenericRef
  3. the type, e.g. string or tGenericRef
  4. is the attribute optional (default) or required?
  • default: the default vaue (optional), e.g. TRUE

Examples

*{{constraint|vehicleRef|rml|tGenericRef|mandatory}}

delivers

  • vehicleRef: tGenericRef (xs:IDREF); mandatory
*{{constraint|vehicleCount|rml|tCounter|default=1}}

delivers

*{{constraint|frontGangway|xsd|boolean}}

delivers