Template:Exists: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
No edit summary |
No edit summary |
||
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{# | <includeonly>{{#vardefine:alternativtext|'''This element does not exist in version {{{version}}}. It only exists in Version(s) {{versioLink|{{{subschema}}}:{{{element}}}{{#if:{{{parent|}}}|_{{{parent}}}}}}}.'''}} | ||
{{#vardefine:alternativtext|'''This element does not appear in {{rml|{{{version}}}}}. It is available only in {{rml}} {{versioLink|{{{subschema}}}:{{{element}}}{{#if:{{{parent|}}}|_{{{parent}}}}}}}. Do not hesitate to contact {{site|https://www.railml.org/en/contact.html|'''railML.org'''|inlang=silent}}''' for further questions.'''}} | |||
{{{subschema}}} | {{#ifexist:{{duplicate|subschema={{{subschema}}}|element={{{element}}}|parent={{{parent|}}}}}/{{{version}}}|{{:{{duplicate|subschema={{{subschema}}}|element={{{element}}}|parent={{{parent|}}}}}/{{{version}}}}}|{{#var:alternativtext}}}}</includeonly><noinclude> | ||
Template to check if an element exists in a certain version. I yes, the Syntax will be displayed. Otherwise a notice will appear. | Template to check if an element exists in a certain version. I yes, the Syntax will be displayed. Otherwise a notice will appear. | ||
This template is designed to serve [[template:robot]]. | This template is designed to serve [[template:robot]]. | ||
==Example== | ==Example== | ||
<pre>{{exists|subschema=CO|element=hasName|version=3.1}}</pre> | <pre>{{exists|subschema=CO|element=hasName|version=3.1}}</pre>delivers: | ||
{{exists|subschema=CO|element=hasName|version=3.1}} | {{exists|subschema=CO|element=hasName|version=3.1}} | ||
{{ | <pre>{{exists|subschema=CO|element=hasName|version=3.2}}</pre>delivers: | ||
{{ | {{exists|subschema=CO|element=hasName|version=3.2}} | ||
[[Category:Cemplate]]</noinclude> | [[Category:Cemplate]]</noinclude> |
Revision as of 18:06, 16 June 2021
Template to check if an element exists in a certain version. I yes, the Syntax will be displayed. Otherwise a notice will appear.
This template is designed to serve template:robot.
Example
{{exists|subschema=CO|element=hasName|version=3.1}}
delivers:
This element does not appear in railML® 3.1. It is available only in railML® . Do not hesitate to contact railML.org for further questions.
{{exists|subschema=CO|element=hasName|version=3.2}}
delivers:
This element does not appear in railML® 3.2. It is available only in railML® . Do not hesitate to contact railML.org for further questions.