Template:DefSemcon: Difference between revisions
Jump to navigation
Jump to search
[checked revision] | [checked revision] |
(Created page with "<includeonly> {{#switch:{{{2}}} |instance={{semcon|{{#if:{{{link|}}}|{{{{{link}}}}}|{{{text}}}}}|id={{{1}}}|status={{{status}}}|forum={{{forum|{{fixme|Forum missing}}}}}|proposed={{{proposed}}}|approved={{{approved|}}}|deprecated={{{deprecated}}}}} |#default= {{!}}- {{!}}{{{1}}}{{!}}{{!}}{{#if:{{{link|}}}|[[template:{{{link}}}|Text]]|{{{text}}}}}{{!}}{{!}}{{{status}}}{{!}}{{!}}{{{proposed}}}{{!}}{{!}}{{{approved|Not yet approved}}}{{!}}{{!}}{{{deprecated|}}}{{!}}{{!}} {{...") |
No edit summary |
||
Line 6: | Line 6: | ||
{{!}}{{{1}}}{{!}}{{!}}{{#if:{{{link|}}}|[[template:{{{link}}}|Text]]|{{{text}}}}}{{!}}{{!}}{{{status}}}{{!}}{{!}}{{{proposed}}}{{!}}{{!}}{{{approved|Not yet approved}}}{{!}}{{!}}{{{deprecated|}}}{{!}}{{!}} {{{forum|{{fixme|Forum missing}}}}} {{!}}{{!}} {{#dpl:category=semcon{{{1}}}}} | {{!}}{{{1}}}{{!}}{{!}}{{#if:{{{link|}}}|[[template:{{{link}}}|Text]]|{{{text}}}}}{{!}}{{!}}{{{status}}}{{!}}{{!}}{{{proposed}}}{{!}}{{!}}{{{approved|Not yet approved}}}{{!}}{{!}}{{{deprecated|}}}{{!}}{{!}} {{{forum|{{fixme|Forum missing}}}}} {{!}}{{!}} {{#dpl:category=semcon{{{1}}}}} | ||
}} | }} | ||
</includeonly><noinclude>{{interwiki}}[[category:Template]]</noinclude> | </includeonly><noinclude> | ||
== Usage == | |||
The purpose of this template is to define semantic constraints. | |||
=== Workflow === | |||
* Define a semantic constraint using [[Template:DefSemcon]] in [[Template:Switch/Dev:SemanticConstraints]], e.g. <nowiki>|IS:001={{DefSemcon|{{{1}}}|{{{2}}}|text=Starting time stamp (e.g. "from") shall be lower or equal any ending time stamp (e.g. "to") if both are given. Must not overlap with other validity periods within the same enclosing element.|status=approved|proposed=2024-01-15|approved=2024-04-15}}</nowiki> | |||
* Call this definition in [[Template:List/Dev:SemanticConstraints]], e.g. <nowiki>{{Switch/Dev:SemanticConstraints|IS:001}}</nowiki> | |||
* Call this definition in the respective element page, e.g. <nowiki>{{Switch/Dev:SemanticConstraints|IS:001|instance}}</nowiki> | |||
=== Arguments === | |||
*1: The ID, e.g. IS:001 | |||
*2:The mode. Use 2=''instance'' to introduce a semantic constraint in an element article. Any other value (or no value at all) results in a table line for [[Template:List/Dev:SemanticConstraints]] | |||
*text: The text of the semantic constraint | |||
*link: Link to the text of the semantic constreint, if the text is placed in a separate template. This is necessary e.g. if the thext contains line breakes. | |||
*status: Can be ''proposed'', ''discarded'', ''approved'' or ''deprecated''. | |||
*proposed: The proposal date (YYYY-MM-DD) | |||
*approved: The approval date (YYYY-MM-DD) | |||
*deprecated: The deprecation date (YYYY-MM-DD) | |||
*forum: The link to the place where to discuss the semantic constraint | |||
{{interwiki}}[[category:Template]]</noinclude> |
Latest revision as of 16:32, 19 May 2025
Usage
The purpose of this template is to define semantic constraints.
Workflow
- Define a semantic constraint using Template:DefSemcon in Template:Switch/Dev:SemanticConstraints, e.g. |IS:001={{DefSemcon|{{{1}}}|{{{2}}}|text=Starting time stamp (e.g. "from") shall be lower or equal any ending time stamp (e.g. "to") if both are given. Must not overlap with other validity periods within the same enclosing element.|status=approved|proposed=2024-01-15|approved=2024-04-15}}
- Call this definition in Template:List/Dev:SemanticConstraints, e.g. {{Switch/Dev:SemanticConstraints|IS:001}}
- Call this definition in the respective element page, e.g. {{Switch/Dev:SemanticConstraints|IS:001|instance}}
Arguments
- 1: The ID, e.g. IS:001
- 2:The mode. Use 2=instance to introduce a semantic constraint in an element article. Any other value (or no value at all) results in a table line for Template:List/Dev:SemanticConstraints
- text: The text of the semantic constraint
- link: Link to the text of the semantic constreint, if the text is placed in a separate template. This is necessary e.g. if the thext contains line breakes.
- status: Can be proposed, discarded, approved or deprecated.
- proposed: The proposal date (YYYY-MM-DD)
- approved: The approval date (YYYY-MM-DD)
- deprecated: The deprecation date (YYYY-MM-DD)
- forum: The link to the place where to discuss the semantic constraint