| 树格式 | |
|---|---|
| 以树(嵌套的HTML无序列表)的形式显示查询结果 | |
| 更多信息 | |
| 提供者: | Extension "Semantic Result Formats" |
| 添加版本: | 1.7.1 |
| 移除版本: | 仍支持 |
| 需求: | 无 |
| 格式名称: | tree |
| 启用?表明安装相应扩展时是否默认启用该结果格式。 | 是 |
| 作者: | Stephan Gambke |
| 分类: | 杂项 |
| 关键词 | |
| 目录 | |
结果格式tree(树),属于Semantic Result Formats扩展,可用于以树,即嵌套的HTML无序(符号)列表,的形式显示查询结果。此结果格式与结果格式oltree(有序列表树)非常相似,后者用于把查询结果以有序列表,而不是无序列表,的格式展示。
格式ultree(无序列表树)只是此结果格式的别名。
参数
| ⧼validator-describe-header-parameter⧽ | ⧼validator-describe-header-aliases⧽ | ⧼validator-describe-header-type⧽ | ⧼validator-describe-header-default⧽ | ⧼validator-describe-header-description⧽ |
|---|---|---|---|---|
| propsep | - | ⧼validator-type-string⧽ | , | 结果条目内属性之间的分隔符 |
| valuesep | - | ⧼validator-type-string⧽ | , | 结果属性的值之间的分隔符 |
| template | - | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | 用于展示打印输出的模板的名称 |
| named args | namedargs | ⧼validator-type-boolean⧽ | no | 命名传递给模板的参数 |
| userparam | - | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | 当使用模板时传递给每个模板调用的值 |
| class | - | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | 指定额外的CSS类 |
| introtemplate | - | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | 当有查询结果时显示在结果前的模板的名称 |
| outrotemplate | - | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | 当有查询结果时显示在结果后的模板的名称 |
| sep | - | ⧼validator-type-string⧽ | , | 结果之间的分隔符 |
| prefix | - | ⧼validator-type-string⧽ | none | 控制打印输出内命名空间的显示 |
| parent | - | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | 容纳父页面的属性 |
| root | - | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | 树的根页面 |
| start level | - | ⧼validator-type-integer⧽ | 1 | 树的起始级别,例如把它整合到另一个树内时 |
| template arguments | - | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | 设置命名的参数传递给模板的方式 |
示例
此格式的查询可能如下所示:
{{#ask:
[[Category:Place]]
[[Located in::+]]
|?Population
|format=tree
|parent=Located in
}}
结果:
- Amsterdam (Population: 783,364)
- England (Population: 49,138,831)
- Greenwich
- London (Population: 7,825,200)
- France (Population: 64,102,000)
- Languedoc-Roussillon (Population: 2,520,000)
- Paris (Population: 2,234,105)
- Fresno
- Germany
- Baden-Württemberg
- Karlsruhe (Population: 294,761)
- Stuttgart (Population: 606,588)
- Berlin (Population: 3,520,061)
- Cologne (Population: 1,080,394)
- Frankfurt (Population: 679,664)
- Munich (Population: 1,353,186)
- Stuttgart (Population: 606,588)
- Würzburg (Population: 126,635)
- Baden-Württemberg
- New York City (Population: 8,175,000)
- New York City (Population: 8,175,000)
- Porto (Population: 237.584)
- Rome (Population: 2,761,477)
- San Diego (Population: 1,307,402)
- San Diego (Population: 1,307,402)
- San Francisco
- Sydney (Population: 4,575,532)
- Tokyo (Population: 8,967,665)
- United Kingdom (Population: 49,138,831)
- England (Population: 49,138,831)
- Greenwich
- London (Population: 7,825,200)
- England (Population: 49,138,831)
- Vienna (Population: 1,897, 1,888,776)
- Warsaw (Population: 1,720,398)
- 其他示例
另见
- TreeAndMenu扩展 - 此格式生成的无序列表可使用TreeAndMenu扩展进行转换
- 层次结构内继承帮助页面 - 包括使用此格式模拟层次结构继承的段落