Status: | effective |
Progress: | 100% |
Version: | 3.0.0+ |
Special property "Allows value list"
Allows value list | |
---|---|
Adds a reference to a list of permissible values for a property
| |
Further Information | |
Provided by: | extension "Semantic MediaWiki "No description was provided. |
Added: | 2.5.0 |
Removed: | still in use |
Alias: | has no alias |
Optional: | no |
Visible: | yes |
Annotable: | yes |
Declarative: | yes |
Key: | _PVALI |
Setting: | not specified |
Focus: | property restriction |
In this wiki: | Property:Allows value list |
Table of Contents | |
Template:Interlanguagelink: en The Allows value list property is a special property in Semantic MediaWiki with a built-in meaning: it assigns a reference which is used to define a page which allows to map a list of permissible values to the referencing property. It was introduced with Semantic MediaWiki 2.5.0Released on an unknown date unknown versions of MediaWiki.1
The referenced page is located like a system message in the "MediaWiki" namespace and consists of the string "Smw_allows_list_" and the stored reference as a suffix to it, e.g. "MediaWiki:Smw_allows_list_..." with "..." being replaced by the reference added to this special property.2
Starting with Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki it is possible to add values lists in JSON format to improve handling of lengthy and challenging to edit via wikitext lists.3 The value list is using a simple key, value assignment with the key (e.g. "CC BY 2.5") being used as constraint value with the assigned value argument is there only to described the key and has for the validation no specific relevance.4
Usage
Two steps have to be taken to use this special property when choosing the wikiktext or json approach:
Wikitext
- Add
[[Allows value list::...]]
to a property page for defining a page reference, e.g.[[Allows value list::licenses]]
will define page "MediaWiki:Smw_allows_list_licenses". - Add permissible values as listed items starting either with "*" or "**" to the "MediaWiki:Smw_allows_list_..." page, e.g.
* CC BY 2.5 * CC BY-SA 2.5 * CC BY-ND 2.5 * CC BY-NC 2.5 * CC BY-NC-SA 2.5 * CC BY-ND-SA 2.5
JSON
- Add
[[Allows value list::...]]
to a property page for defining a page reference, e.g.[[Allows value list::licenses.json]]
will define page "MediaWiki:Smw_allows_list_licenses.json". - Add permissible values as listed items in JSON-format to the "MediaWiki:Smw_allows_list_..." page, e.g.
{ "CC BY 2.5": "Creative Commons Attribution 2.5", "CC BY-SA 2.5": "Creative Commons Attribution-ShareAlike 2.5", "CC BY-ND 2.5": "Creative Commons Attribution-NoDerivs 2.5", "CC BY-NC 2.5": "Creative Commons Attribution-NonCommercial 2.5", "CC BY-NC-SA 2.5": "Creative Commons Attribution-NonCommercial-ShareAlike 2.5", "CC BY-ND-SA 2.5": "Creative Commons Attribution-NonCommercial-NoDerivs 2.5" }
Note
- It is possible to assign special property "Allows value"Lists one permissible value for a property as well as this special property to a property page at the same time.