Special property "Subproperty of"

From semantic-mediawiki.org
Subproperty of
Lets you indicate that one property is a subproperty of another
Further Information
Provided by: extension "Semantic MediaWiki "Semantic MediaWiki (SMW) is a free, open-source extension to MediaWiki that lets you store and query data within the wiki's pages. Semantic MediaWiki is also a full-fledged framework, in conjunction with many spinoff extensions, that can turn a wiki into a powerful and flexible knowledge management system. All data created within SMW can easily be published via the Semantic Web, allowing other systems to use this data seamlessly.
Added: 1.0
Removed: still in use
Alias: has no alias
Optional: no
Visible: yes
Annotable: yes
Declarative: yes
Setting: not specified
Focus: not specified
In this wiki: Property:Subproperty of
Table of Contents

The Subproperty of property is a special property in Semantic MediaWiki with a built-in meaning: it lets you indicate that one property is a subproperty of another.

It means that a query for pages with the property should also return pages that have the subproperty. For example, querying for the property "spouse" should also find pages with the properties "wife" and "husband", if those properties have the special property [[subproperty of::Spouse]]. You can query on all subproperties by querying on the head property. For instance,

{{#ask: [[Spouse::+]] }}

returns all pages that use the head property ("spouse") and its subproperties ("wife" and "husband"). If the head property is chosen for an additional printout statement in a query, the corresponding results will be the values of the head property only. To ensure that those of its subproperties are included as well, the relevant subproperties must be explicitly specified. For instance,

{{#ask: [[Spouse::+]]

will print the values of the head property ("spouse") as well as those of the two sub-properties ("wife" and "husband").

On systems where the first letter of an article does not get capitalized make sure that the property is maintained with an capital S [[Subproperty of::Spouse]] otherwise the system does not recognize it as a special property.

This special property also agrees with rdfs:subPropertyOf:

If property P is a subproperty of property P', then all pairs of resources which are related by P are also related by P'.


  • A property's page shows its sub-properties since Semantic MediaWiki 1.2.1Released on 8 August 2008 and compatible with MW 1.11.x - 1.14.x.. The page of the head property does not, however, list the values of its subproperties.
  • If no pages (or very few pages) in the wiki use a property, then even if lots of pages use its subproperties:
    • The property's page will list no (or few) pages under "Pages using the property"
    • The property won't appear in Special:Properties (or will appear with a caution This property is hardly used within the wiki!).

See also[edit]