编辑“︁
Template:Wikidata/doc
”︁(章节)
跳转到导航
跳转到搜索
页面[[:Module:Message box/mbox.css|Module:Message box/mbox.css]]没有内容。
这是
Wikidata
模板的
文档页面
。
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
== 参数 == 参数确定抓取的所有返回值的来源。 === 位置参数 === 下表按固定顺序显示了可用的位置参数(<code>{{Background color|#ffdfc4|参数*}}</code>)。对于每个命令,都会标记适用的参数集。如果给出了多个命令,则适用的参数集是各集合的并集。例如,如果已给出命令 <code>properties</code> 和 <code>qualifiers</code>,那么至少应给出 <code>property_id</code> 和 <code>qualifier_id</code> 两个参数。 可以给出多个 <code>qualifier</code>/<code>qualifiers</code> 命令。这些带有标记的命令的顺序与给定的相应 <code>qualifier_id</code> 参数的顺序相匹配。 {| class="wikitable" style="background:none;border:none;" |- style="text-align:center;" | rowspan="2" style="background:none;border:none;" | | colspan="2" | <small>''(必要)''</small> | <small style="color:#777;">''(可选)''</small> | <small style="color:#777;">(可选)</small> | <small>(必要)</small> | <small style="color:#777;">(可选)</small> | <small>(必要)</small> | <small>(必要)</small> | rowspan="2" style="background:none;border:none;" | |- | colspan="2" | | | | | | | |- | style="border-right:2px solid #000;" | ''<code><nowiki>{{</nowiki>{{{prename|}}}{{lcfirst:{{ROOTPAGENAME}}}}</code>'' | colspan="2" style="border-right:2px solid #000;" | ''<code>命令</code>'' | style="border-right:2px solid #000;" | ''<code style="color:#777;">标记</code>'' ! style="border-right:2px solid #000;background-color:#ffdfc4;" | <code style="color:#777;">entity_id</code> ! style="border-right:2px solid #000;background-color:#ffdfc4;" | <code>property_id</code> ! style="border-right:2px solid #000;background-color:#ffdfc4;" | <code style="color:#777;">raw_value</code> ! style="border-right:2px solid #000;background-color:#ffdfc4;" | <code>qualifier_id</code> ! style="background-color:#ffdfc4;" | <code>qualifier_id</code> | ''<code><nowiki>}}</nowiki></code>'' |- | rowspan="12" colspan="2" style="background:none;border:none;" | | rowspan="2" colspan="2" style="border-style:dashed;border-left-color:blue;border-bottom-color:blue;" | | | | | | | rowspan="12" style="background:none;border:none;" | |- style="text-align:center;" | rowspan="2" | <code>label</code>, <code>title</code>,<br /><code>description</code>,<br /><code>alias</code>/<code>aliases</code>,<br /><code>badge</code>/<code>badges</code> | rowspan="2" style="border-top:none;border-bottom:none;" | | rowspan="2" style="border-top:none;border-bottom:none;" | | rowspan="2" style="border-top:none;border-bottom:none;" | | rowspan="2" style="border-top:none;border-bottom:none;" | |- | rowspan="2" colspan="2" style="border-style:dashed;border-left-color:blue;border-bottom-color:blue;" | |- style="text-align:center;" | rowspan="2" colspan="2" style="border-top:none;" | <code>property</code>/<code>properties</code> | rowspan="2" style="border-top:none;border-bottom:none;" | | rowspan="2" style="border-top:none;border-bottom:none;" | | rowspan="2" style="border-top:none;border-bottom:none;" | |- | rowspan="2" colspan="2" style="border-style:dashed;border-left-color:blue;border-bottom-color:blue;" | |- style="text-align:center;" | rowspan="2" colspan="3" style="border-top:none;" | <code>reference</code>/<code>references</code> | rowspan="2" style="border-top:none;border-bottom:none;" | | rowspan="2" style="border-top:none;border-bottom:none;" | |- | rowspan="2" colspan="2" style="border-style:dashed;border-left-color:blue;border-bottom-color:blue;" | |- style="text-align:center;" | rowspan="2" colspan="4" style="border-top:none;" | <code>qualifier</code>/<code>qualifiers</code> | rowspan="2" style="border-top:none;border-bottom:none;" | |- | rowspan="2" colspan="2" style="border-style:dashed;border-left-color:blue;border-bottom-color:blue;" | |- style="text-align:center;" | rowspan="2" colspan="5" style="border-top:none;" | <code>qualifier</code>/<code>qualifiers</code> ''(可选 2<sup>nd</sup>, 3<sup>rd</sup> 等)'' |- | rowspan="2" colspan="2" style="border:none;" | |- | colspan="5" style="border:none;" | |} 下面是所有位置参数的描述。 {| class="wikitable" |- ! 参数 ! 描述 |- ! style="text-align:left;" | <code style="color:#777;">entity_id</code> <small style="font-weight:normal;">(optional)</small> | '''<code>{{color|red|[昂贵]}}</code>''' 要访问的项目实体的'''Q标识符'''(如 <code>Q55</code>)或要访问的属性-实体的带由前缀<code>Property:</code>的'''P标识符'''(或是可用的'''[[#属性别名|别名]]''')(如 <code>Property:P38</code>)。 如果是[[#通用类|通用类命令]],可以省略P标识符前缀<code>Property:</code>(如 <code>P38</code>)。 如果省略此参数,则使用连接到当前页面的项目-实体(除非给出 <code>eid=</code>,见下文)。如果给出此参数但为空(如 <code>||</code>),那么依据它的位置,此字段会被解释为[[#标记|空标记]],因此被忽略。另见下面的[[#命名参数|<code>eid=</code> 命名参数]],也可用于提供实体ID,但不会出现连接到当前页面的项目-实体被用作此特定情况的结果。 |- ! style="text-align:left;" | <code>property_id</code> | 要访问的实体内的属性的'''P标识符'''(或是可用的'''[[#属性别名|别名]]'''),无前缀 <code>Property:</code>(如 <code>P35</code>)。 |- ! style="text-align:left;" | <code style="color:#777;">raw_value</code> <small style="font-weight:normal;">(optional)</small> | Either the '''Q标识符''' equal to the property value (e.g. <code>Q29574</code>) or a '''literal value''' (i.e. string or quantity etc., ''no entity label'') equal to the raw property value of the particular claim to be accessed. Dates as literal values must be formatted <code>yyyy-mm-dd</code> (e.g. <code>1731-02-11</code>) for dates with a precision of days, <code>yyyy-mm</code> (e.g. <code>1731-02</code>) for dates with a precision of months, and <code>yyyy</code> (e.g. <code>1731</code>) for dates of lesser precision. Dates BCE require a minus sign in front of the year (e.g. <code>-2950-01-31</code>). Dates stored in the Julian calendar must have <code>/Julian</code> attached to the end (e.g. <code>1731-02-11/Julian</code>). Decades like the 2010s must be given as <code>2010</code> (but the 2010s BCE as <code>-2019</code>), centuries like the 20th century as <code>1901</code> (but the 20th century BCE as <code>-2000</code>), and millenniums like the 3rd millennium as <code>2001</code> (but the 3rd millennium BCE as <code>-3000</code>). Globe coordinates as literal values must be formatted with forward slashes (i.e. <code>/</code>) between the parts and no symbols (e.g. <code>52/5/3/N/4/19/3/E</code>) ''without any spaces or leading zeros''. The special type ''''no value'''' can be given by entering the empty string (i.e. <code>||</code>) and the special type ''''unknown value'''' can be given by entering a single underscore (i.e. <code>|_|</code>). To get a literal underscore, escape it by placing a backslash <code>\</code> directly in front of it (i.e. <code>\_</code>); the same holds for a literal backslash (i.e. <code>\\</code>). 要获得竖线 <code>|</code>,使用 <code>{{tl|!}}</code> 或 <code>&#124;</code>。 如果省略此参数, 将访问该属性中的所有声称(匹配任何其他约束)。 |- ! style="text-align:left;" | <code>qualifier_id</code> | 要访问的实体内的限定符的'''P标识符'''(或是可用的'''[[#属性别名|别名]]'''),无前缀 <code>Property:</code>(如 <code>P580</code>)。 |} === 命名参数 === 下面是对所有命名参数的描述,这些参数是name-value对(即 <code>|name=value</code>)。这些都是可选的,可以在任何地方给出 {{module other|after the first command|inside the call}}。 {| class="wikitable" |- ! 参数 ! 描述 |- ! style="text-align:right;" | <code>eid=</code> | '''<code>{{color|red|[EXPENSIVE]}}</code>''' 该参数提供与 [[#Positional arguments|positional argument <code>entity_id</code>]] 相同的功能(如 <code>|eid=Q55</code>), 有一点不同:如果给出了参数但是它的值是空的(如 <code>|eid=</code>),那么不会有任何实体,而不是连接到当前页面的项目实体。这在需要变量entity-ID的某些情况下很有用,但是不应将连接到当前页面的项目实体作为默认值进行访问。 此外对于所有命令的P标识符,可以省略前缀 <code>Property:</code>(如 <code>|eid=P38</code>)。 仅当省略位置参数 <code>entity_id</code> 时,此参数才有效。 |- ! style="text-align:right;" | <code>''<qualifier>''=</code> | The <code>''<qualifier>''</code> is a placeholder for a set of arguments that determine which claims should be accessed based on qualifier value, analogous to the pair of [[#Positional arguments|positional arguments <code>property_id</code> and <code>raw_value</code>]] that determine access based on property value. As such, <code>''<qualifier>''</code> is any qualifier's '''P-identifier''' (or an available '''[[#Property aliases|alias]]''') without the <code>Property:</code> prefix (e.g. <code>P518</code>). Its value is either the '''Q-identifier''' equal to one of the qualifier values (e.g. <code>Q27561</code>) or a '''literal value''' (i.e. string or quantity etc., ''no entity label'') equal to one of the raw qualifier values of the particular claim to be accessed. The value format is the same as for the positional argument <code>raw_value</code>. The special type ''''no value'''' given by the empty string also matches the total absence within the claim of the particular qualifier. Example: <code>|P518=Q27561</code> Multiple arguments of this type can be given to match multiple qualifier values simultaneously for each claim. |} === 属性别名 === 属性别名是可以替代使用的P标识符的名称。以下属性别名([[大小写敏感性|大小写敏感]])目前可用: {| class="wikitable" |- ! 别名 ! <sub>转<br /></sub><sup>为</sup> ! P标识符 |- <!-- property aliases purely for convenience --> | coord ||style="text-align: center;"| → || [[d:Property:P625|P625]] |- !colspan="3"| |- <!-- property aliases used by the module itself --> | image ||style="text-align: center;"| → || [[d:Property:P18|P18]] |- | author ||style="text-align: center;"| → || [[d:Property:P50|P50]] |- | publisher ||style="text-align: center;"| → || [[d:Property:P123|P123]] |- | importedFrom ||style="text-align: center;"| → || [[d:Property:P143|P143]] |- | statedIn ||style="text-align: center;"| → || [[d:Property:P248|P248]] |- | pages ||style="text-align: center;"| → || [[d:Property:P304|P304]] |- | language ||style="text-align: center;"| → || [[d:Property:P407|P407]] |- | publicationDate ||style="text-align: center;"| → || [[d:Property:P577|P577]] |- | startTime ||style="text-align: center;"| → || [[d:Property:P580|P580]] |- | endTime ||style="text-align: center;"| → || [[d:Property:P582|P582]] |- | chapter ||style="text-align: center;"| → || [[d:Property:P792|P792]] |- | retrieved ||style="text-align: center;"| → || [[d:Property:P813|P813]] |- | referenceURL ||style="text-align: center;"| → || [[d:Property:P854|P854]] |- | sectionVerseOrParagraph ||style="text-align: center;"| → || [[d:Property:P958|P958]] |- | archiveURL ||style="text-align: center;"| → || [[d:Property:P1065|P1065]] |- | title ||style="text-align: center;"| → || [[d:Property:P1476|P1476]] |- | formatterURL ||style="text-align: center;"| → || [[d:Property:P1630|P1630]] |- | quote ||style="text-align: center;"| → || [[d:Property:P1683|P1683]] |- | shortName ||style="text-align: center;"| → || [[d:Property:P1813|P1813]] |- | archiveDate ||style="text-align: center;"| → || [[d:Property:P2960|P2960]] |- | inferredFrom ||style="text-align: center;"| → || [[d:Property:P3452|P3452]] |- | typeOfReference ||style="text-align: center;"| → || [[d:Property:P3865|P3865]] |- | column ||style="text-align: center;"| → || [[d:Property:P3903|P3903]] |}
摘要:
请注意,所有对Local Chinese Wikipedia的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Project:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
导航菜单
个人工具
未登录
讨论
贡献
创建账号
登录
命名空间
模板
讨论
大陆简体
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
查看
阅读
编辑
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息