Template:Constraint: Difference between revisions
Jump to navigation
Jump to search
[checked revision] | [checked revision] |
(darstellung) |
|||
Line 21: | Line 21: | ||
*{{constraint|frontGangway|xsd|boolean}} | *{{constraint|frontGangway|xsd|boolean}} | ||
[[category: | [[category:ContentTemplate]] | ||
</noinclude> | </noinclude> |
Revision as of 11:24, 19 August 2019
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:
- The attribute name to which the constraint applies
- xsd for standard types like string and boolean resp. rml for generic railML® types like tGenericRef
- the type, e.g. string or tGenericRef
- 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
- vehicleCount: tCounter (xs:nonNegativeInteger); default: 1; optional
*{{constraint|frontGangway|xsd|boolean}}
delivers
- frontGangway: xs:boolean; optional