Template:InheritIdNameConstraints: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[unchecked revision][checked revision]
(Updated using new template (Vorlage:InheritIdConstraints))
(+doku, nolang)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{InheritIdConstraints}}
<includeonly>{{#ifeq:{{{noid}}}|1||{{InheritIdConstraints}}}}
{{#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|code}} {{RailMLType|tGenericName}}, optional
<pre>{{InheritIdNameConstraints|noid=1}}</pre>delivers:
{{InheritIdNameConstraints|noid=1}}


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


* {{Attr|description}} {{RailMLType|tElementDescription}}, optional
[[Category:ConstraintsTemplate]]</noinclude>
 
* {{Attr|xml:lang}} {{XsdType|language}}, [http://www.w3.org/TR/xml/#sec-lang-tag language identification], optional<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