fertrun.blogg.se

Mediawiki subcategories
Mediawiki subcategories











It is not currently possible in SMW to query for subcategories in all levels of the category hierarchy.I want to generate an xml/json that displays the category info (count of pages and subcats) for all sub-subcategories in a specific category in Wikipedia. Subcategories in deeper levels of the category hierarchy (for instance, those in Category:Developer documentation) are not included in the results.

Mediawiki subcategories plus#

(it is not required to use the Category: prefix or to de-link the results)ĪPI, Ask syntax, Configuration parameters, Datatypes, Developer documentation, Functional classes, Installation, Maintenance, Maintenance alert, Parser hooks, Result formats, Samples, Schema, Semantic MediaWiki Plus extensions, Semantic MediaWiki documentation - old releases, Semantic MediaWiki documentation/de, Semantic MediaWiki documentation/fr, Semantic MediaWiki documentation/ja, Semantic MediaWiki documentation/nl, Semantic MediaWiki documentation/zh-hans, Semantic MediaWiki extensions, Semantic MediaWiki historical documentation, Semantic gardening, Special pages, Special properties, Store documentation, Upgrade, User rights and groups Note You can query in all subcategories by querying on the head category. " Special properties" and " Configuration parameters", if those categories have the special property ]. Querying for a page within the category " Semantic MediaWiki documentation" should also find pages within its subcategories, e.g. This means that a query on a given head category considers pages in those subcategories (including subcategories lower down the hierarchy) where the special property has been manually declared conversely, it ignores pages in those subcategories where the special property has not been declared. This is where the special property comes in: it lets you explicitly declare subclass relationships for any subcategory, enabling you to specify which subcategories should be considered in querying. If configuration parameter $smwgUseCategoryHierarchy Sets whether elements of the subcategory hierarchy are considered as hierarchy elements in the annotation process is set to " false", however, then pages in subcategories do not automatically turn up in query results. See also Help:Inferencing#Subcategories for general information. Subcategories that are found lower in the same hierarchy are also considered in querying, to an extent. If this configuration setting is set to " true" (per the default setting), the special property is automatically set on any subcategory and Semantic MediaWiki automatically considers MediaWiki's subcategory hierarchy in querying: for example, if "B" is a subcategory of "A", then a query for all pages within "A" should also return all pages in "B". It is primarily useful when configuration parameter $smwgUseCategoryHierarchy Sets whether elements of the subcategory hierarchy are considered as hierarchy elements in the annotation process is set to " false" and subcategories need to be explicitly declared - or else ignored - as subclasses.ĭeclaring this property is useful only if configuration parameter $smwgUseCategoryHierarchy Sets whether elements of the subcategory hierarchy are considered as hierarchy elements in the annotation process is set to " false". The Subcategory of property is a special property in Semantic MediaWiki with a built-in meaning: it is used to indicate that a category is a subcategory of another and that SMW should treat this subcategory as a subclass for the purpose of inferencing in queries.











Mediawiki subcategories