Template:DocInfobox docStatement/doc

From Wikidata
Jump to navigation Jump to search

This template builds the content of |doc= parameter for {{Statement+}}. "doc" is a free format text parameter to enter descriptive information to explain the meaning, use and constrains for the displayed case in the Statement+. The present template help to build a structured and visual format easy to use. It is specially useful when create a massive collection of Statement cases for documentation.

Syntax[edit]

{{DocInfobox docStatement|property= |example= |case= |monovalue= |symmetric= |units= |reference= |inverse=
|one_of= |contemporary= |qualifier= |description= |doc=}}

Parameters[edit]

property or p= Property code which is documented in this case.
example or e= Name of the property documentation page (without claudators)
case or qid= Item Qid used as a case in this Statement+
monovalue or m= 1, to indicate that the property has single-value constraint. Any other value for multi-value constraint
symmetric or s= any value to indicate that the property has symmetric constraint.
units or u= any value to indicate that the property has allowed units constraint.
reference or r = any value to indicate that the property has citation needed constraint.
inverse or i= any value to indicate that the property has inverse constraint.
one_of or o= any value to indicate that the property has one-of constraint.
contemporary or c = any value to indicate that the property has contemporary constraint.
qualifier or q = Up to 10 qualifier codes separated by comma that are allowed qualifiers constraint.
description or d = Free edited text with description.
doc = {{{doc|}}} This is an exceptional parameter that must always be as shown in this documentation.

When a case use of a {{Statement+}} is made with {{DocInfobox docStatement}} and it is saved as an auxiliary article to be expanded (ex.: {{wikidata:Case for documentation of P119-Q2356054}}), the content of original |doc= of the {{Statement+}} for this case will be transclude everytime it was used.
However, if we wish to use the case without or with another value of the original doc, we should write:
{{wikidata:Case for documentation of P119-Q2356054|doc=new value abc, ....}}|} to override the original content value prepared inside. Write "none" as new value to change for nothing.

Example[edit]

{{DocInfobox docStatement |property= P20 |example= {{DocInfobox prefix}}/doc/P20
|case =Q235605 |monovalue=2  | symmetric=y  |units=y |reference=y  |inverse=y |one_of=y |contemporary=y  |qualifier=P1545, P3831
|description= Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}}

results:

documentation P20 multi-value constraint symmetric constraint contemporary constraint allowed units constraint inverse constraint one-of constraint allowed qualifiers constraint: series ordinal, object has role citation needed constraint example: Jeanne Hébuterne


Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Use within the {{Statement+}}[edit]

{{Statement+  | width_doc=30% | color_doc= #FFFFE7 |reference=close
|P={{P-|36}}
|V1.rank=+1
|V1={{Q-|90}}
|q1.p={{P-|P580}}  |q1.v1= 5 oct 1789
|V2={{Q-|Q621}}
|V2.q1.p={{P-|580}}
|V2.q1.v1={{date|1682}}
|V2.q2.p={{P-|582}}
|V2.q2.v1={{date|1789|10|05}}
|doc={{DocInfobox docStatement|P=P36 |qid=Q142|m=1|i=y|s=1|q=P580,P582,P1365,P1366|d=Complementary instructions as "between 1940 and 1944 capital was moved to Bayeux, Vichèi, Alger, Londres, Bordeus, Tours, because te WWII". ''(not displayed)''}}
}}
capital
Preferred rank Paris
start time
0 references
add reference
Normal rank Versailles
start time
end time
0 references
add reference
 symmetric constraint inverse constraint allowed qualifiers constraint: start time, end time, replaces, replaced by example: France
Complementary instructions as "between 1940 and 1944 capital was moved to Bayeux, Vichèi, Alger, Londres, Bordeus, Tours, because te WWII". (not displayed)
add value
Case of transclusion use avoiding original value
{{case of P36-Q90|doc=none}}
capital
Preferred rank Paris
start time
0 references
add reference
Normal rank Versailles
start time
end time
0 references
add reference


add value
Case of transclusion changing original value
{{case of P36-Q90|doc=abc...def.}}
capital
Preferred rank Paris
start time
0 references
add reference
Normal rank Versailles
start time
end time
0 references
add reference
abc...def.
add value

See also[edit]