Dev:Multiplicity: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
(Created page with "{{head|Multiplicity}} The section ''Multiplicity'' in element documentation pages reports the occurence indicators of the respective element, by name the values of ''minOccur...")
 
(Replaced dead link)
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{head|Multiplicity}}
{{head|Multiplicity}}


The section ''Multiplicity'' in element documentation pages reports the occurence indicators of the respective element, by name the values of ''minOccurs'' and ''maxOccurs''. For example, in <tt><{{IS:Doc|ocpRef|path|{{#if:|{{{attr}}}}}}}></tt> the multiplicity is depicted with [2..2], which means, that ''minOccurs''=''maxOccurs''=2 resp., every {{IS:Tag|path}} requires exactly two instances of {{IS:Tag|ocpRef|path}}.
The section ''Multiplicity'' in element documentation pages reports the occurence indicators of the respective element, by name the values of ''minOccurs'' and ''maxOccurs''. For example, in <tt><{{wiki2|IS:ocpRef_path#Multiplicity_.2F_Anzahl_.2F_Multiplicit.C3.A9|ocpRef}}></tt> ({{rml|2}}) the multiplicity is depicted with [2..2], which means, that ''minOccurs''=''maxOccurs''=2 resp., every <tt><{{wiki2|IS:path}}></tt> requires exactly two instances of <tt><{{wiki2|IS:ocpRef_path|IS:ocpRef}}></tt>.


The default values for ''minOccurs'' and ''maxOccurs'' are 1, which means that on default an element has to be used exactly once, like in {{CO:Tag|isoCountryCode}}.
The default values for ''minOccurs'' and ''maxOccurs'' are 1, which means that on default an element has to be used exactly once, like in <tt><{{wiki2|IS:trackTopology_#Multiplicity_.2F_Anzahl_.2F_Multiplicit.C3.A9|IS:trackTopology}}></tt> ({{rml|2}}) and in <tt><{{wiki3|IS:topology}}></tt> ({{rml|3}}).


As an element cannot be employed a negative number of times or halve a time, ''minOccurs'' and ''maxOccurs'' have to be non-negative integers. ''maxOccurs'' must be ≥''minOccurs''. ''maxOccurs'' may be unbounded (∞), as in <tt><{{IS:Doc|track||{{#if:|{{{attr}}}}}}}></tt>.
As an element cannot be employed a negative number of times or halve a time, ''minOccurs'' and ''maxOccurs'' have to be non-negative integers. ''maxOccurs'' must be ≥''minOccurs''. ''maxOccurs'' may be unbounded (∞/*), as with {{Tag|IS|track}}.
==For Further Reading==
==For Further Reading==
*{{external|https://www.w3schools.com/xml/schema_complex_indicators.asp}}
*{{external|https://www.w3schools.com/xml/schema_complex_indicators.asp}}
[[Category:GeneralDescription]]

Latest revision as of 07:14, 15 November 2022

Multiplicity
 

The section Multiplicity in element documentation pages reports the occurence indicators of the respective element, by name the values of minOccurs and maxOccurs. For example, in <ocpRef> (railML® 2) the multiplicity is depicted with [2..2], which means, that minOccurs=maxOccurs=2 resp., every <IS:path> requires exactly two instances of <IS:ocpRef>.

The default values for minOccurs and maxOccurs are 1, which means that on default an element has to be used exactly once, like in <IS:trackTopology> (railML® 2) and in <IS:topology> (railML® 3).

As an element cannot be employed a negative number of times or halve a time, minOccurs and maxOccurs have to be non-negative integers. maxOccurs must be ≥minOccurs. maxOccurs may be unbounded (∞/*), as with <track>.

For Further Reading