Template:InheritIdNameConstraints: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
No edit summary
(+doku, nolang)
 
Line 1: Line 1:
{{#ifeq:{{{noid}}}|1||{{InheritIdConstraints}}}}
<includeonly>{{#ifeq:{{{noid}}}|1||{{InheritIdConstraints}}}}
 
{{#ifeq:{{{nocode}}}|1||* {{Attr|code}}: {{RailMLType|tGenericName}}, optional}}
{{#ifeq:{{{nocode}}}|1||* {{Attr|code}}: {{RailMLType|tGenericName}}, optional}}
* {{Attr|name}}: {{RailMLType|tGenericName}}, optional
* {{Attr|description}}: {{RailMLType|tElementDescription}}, optional
{{#ifeq:{{{nolang}}}|1||{{InheritLangConstraints}}}}</includeonly><noinclude>
==Usage==
This template displays constraints to selected attributes analogously to [[Template:InheritIdName]].
===Arguments===
*nocode: Suppress code constraints if nocode=1
*nolang: Suppress language constraints if nolang=1
==Examples==
<pre>{{InheritIdNameConstraints}}</pre>delivers:
{{InheritIdNameConstraints}}


* {{Attr|name}}: {{RailMLType|tGenericName}}, optional
<pre>{{InheritIdNameConstraints|noid=1}}</pre>delivers:
{{InheritIdNameConstraints|noid=1}}


* {{Attr|description}}: {{RailMLType|tElementDescription}}, optional
<pre>{{InheritIdNameConstraints|nolang=1}}</pre>delivers:
{{InheritIdNameConstraints|nolang=1}}


{{InheritLangConstraints}}<noinclude>[[Category:ConstraintsTemplate]]</noinclude>
[[Category:ConstraintsTemplate]]</noinclude>

Latest revision as of 17:47, 9 February 2022

Usage

This template displays constraints to selected attributes analogously to Template:InheritIdName.

Arguments

  • nocode: Suppress code constraints if nocode=1
  • nolang: Suppress language constraints if nolang=1

Examples

{{InheritIdNameConstraints}}

delivers:

  • id: xs:ID, required
    a string, starting with a letter (a..zA..Z) or an underscore (_),
    followed by a non-colonized and non-spaced string consisting of letters, digits, points (.), dashes (-) or underscores (_)
  • code: xs:string, optional
  • name: xs:string, optional
  • description: xs:string, optional
  • xml:lang: xs:language, language identification, optional
{{InheritIdNameConstraints|noid=1}}

delivers:

{{InheritIdNameConstraints|nolang=1}}

delivers:

  • id: xs:ID, required
    a string, starting with a letter (a..zA..Z) or an underscore (_),
    followed by a non-colonized and non-spaced string consisting of letters, digits, points (.), dashes (-) or underscores (_)
  • code: xs:string, optional
  • name: xs:string, optional
  • description: xs:string, optional