Markus Krötzsch wrote:
 > For example:
 >
 > {{#ask: [[Query:French cities]] [[Population::>1000]] }}
 >
 > where [[Query:French cities]] is the query "[[Category:City]] [[located
 > in::France]]".

In a previous very illuminating message, you said "It is very easy to map
an #ask query to an OWL class description (the query then is the task of
finding all elements of the class description)."  So, in the same
way that [[Category:City]] matches all pages which assert [[Category:City]],
each page has an implicit assertion [[elementOf::French cities]], where
"French cities" is a query page, but this page is really a page about
a class description.

 > * We need to define how users would enter queries that they would like to be
 > saved. I think each query-page would hold one query and arbitrary bits of
 > documentation. To enter the query, users would use the syntax as in #ask.
 > There are some options for the details:
 > ** We use a special property such as [[query:: [[Category:City]] ... ]].
 > ** We use a new parser hook such as {{#query:  [[Category:City]] ... }}.
 > ** We overload #ask for pages in that namespace, i.e.
 > {{#ask:  [[Category:City]] ... }} would work differently on those pages (it
 > could still show the results, but it would also be required to be unique, and
 > its query part would be saved).

I much prefer [[query:: [[Category:City]] ... ]].  I would like to be able
treat a query (class description) like other pages, and ask SWM questions
about the queries in the wiki.  So treating "query" like any other property is 
good.

Also, eventually SMW could support alternative properties than "query" to
describe the class (of query results).  For example, a property that allows
an alternate syntax, or some XML from an OWL class description.

 > * We (or at least I) need to consider how to store queries in the database. I
 > can treat them similar to property values that can be very long (Type:Text).
 > As long as there is no caching, the query string would thus be processed in a
 > purely syntactic manner: you use it in a query, and SMW replaces it with its
 > real query string.

Wouldn't you store the list of pages in the same way that you store them for
a category?  (Isn't the list of pages in a category cached?)

- Jeff




-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to