Last modified: 2008-01-19 22:27:12 UTC
I noticed the query on the http://ontoworld.org/wiki/Property:Has_category page doesn't return anything, yet there are many instances of this property. I suspect the magic word "category" in the property name "has category" causes problems, as a query for [[Has instance::+]] works fine; or maybe there's a problem retrieving objects of properties in the namespace "Category:". I tried to reproduce this on my own install, and the query worked with one test relation [[Has category::Germany]] in the wiki but failed with the test relation [[Has test::Category:Germany]] in the wiki. Feel free to reassign this back to me for more research.
I think it's my latter hypothesis; when the object of the property is in the namespace "Category:", queries for that property don't return it. See the test at http://ontoworld.org/wiki/SMW_unit_test:Test_relation2. Do you have to specify the namespace for the objects of queries? Also see the query in http://ontoworld.org/wiki/Property:Has_subclass, it leaves out a number of pages with this property.
A standard feature of SMW is to restrict sematnic queries to certain namespaces. By default, these namespaces are MAIN and IMAGE, and thus category pages are not considered in page positions in queries. This can be changed manually for single queries, or globally by extending the default namespace settings of the wiki. It is also possible to disable this filtering feature completely. I have added details on how to do that to http://ontoworld.org/wiki/SMW_unit_test:Test_relation2.
The bug is now FIXED because shortly before SMW 1.0 Markus changed the default to $smwgQDefaultNamespaces = NULL, so there are no default namespace restrictions for queries.