WOW! Markus, this is great present for being back from vacation! ;) I'll test it on my instances as soon as I'll get some time with computer tomorrow.

     Sergey


On Nov 23, 2007 4:01 PM, Markus Krötzsch < mak@aifb.uni-karlsruhe.de> wrote:
And another note: {{#ask}} is in SVN (in a first version).

Working example query:

{{#ask: [[Category:Country]] [[borders::Nigeria]] |
 ?population|
 ?area#km² = ''Size''|
 format=list|
 limit = 3|
 link=all|
 intro=<b>Test</b>_|
}}

Moreover, it is now of course possible to use templates and their params
rather freely in {{#ask}}. Actually even some very unreasonable things work,
but many cool things should also be possible. One real issue might be that
uninitiated users might nest {{#ask}} in order to emulate <q>-subqueries,
even though the latter are much more efficient and complete. Of course
nesting sometimes is desirable:

{{#ask:
[[Category:Country]]
[[population::>{{#ask:headers=hide|?Population|[[Uganda]]}} ]]  |
 sort=population|
 ?population
}}

This indeed works now.

Here is what should hopefully work for #ask on SVN:

* all printout formats other than "debug" (which still gives some HTML),
* all known parameters (though some now are more flexible since you can use
wiki-markup as values),
* printout requests with the syntax "? property#unit = label",
* basic queries, nested queries, value ranges, wildcards, and yet
* <ask> should work as it did before (I hope).

Here is what certainly does not work:

* links to further results don't work in wikitext (we need another URL-scheme
for that, but "external" links may be my first fix),
* printouts of Categories do not work via "? Category" yet,
* disjunctions in queries obviously do not work yet, since "|" is already
taken in templates (Sergey suggested a solution that would require queries to
be the last #ask-parameter, but we may even get around this by providing an
alternative syntax for "||"),
* a query with limit 0 might show a broken further results link,
* templated and embedded printers may pull annotations into the article where
the query is -- this needs some advanced fix as there is currently no way for
us to distinguish #ask-printed results from the text someone entered
directly.

I guess there are more things, but at least most of the above should be fixed
soon. Feel free to try out the devel version (otherwise it's pretty much RC2,
no updates needed) and let me know what breaks/works/is still missing.

Cheers,

Markus

--
Markus Krötzsch
Institut AIFB, Universät Karlsruhe (TH), 76128 Karlsruhe
phone +49 (0)721 608 7362        fax +49 (0)721 608 5998
mak@aifb.uni-karlsruhe.de        www  http://korrekt.org