Thanks Markus for the great introduction! (notice that in his hurry, he
forgot the second ":" in most of the queries. So if you were trying out,
now you know where the problem was).
I wrote a tutorial text on Inline Queries:
Feel free to improve the text. Maybe something shorter and more
structured would be nice as well, but I think you should be able to get
all informations you need here.
I hope you like it!
All the best,
Markus Krötzsch wrote:
> just so you know what to do with inline queries, here comes a very brief
> collection of examples. Every inline query is put between <ask> and </ask>.
> Returns all articles in the category "Test" as a simple comma separated list.
> This simple output is chosen whenever you search for single articles. If more
> than one article or data-value is involved in the query, dynamic tables are
> returned. You can click on the table headers for dynamic alphabetic/numeric
> <ask>[[is capital of:Germany]]</ask>
> Returns every article that contains the annotation "[[is capital
> <ask>[[is capital of:*]]</ask>
> Returns all annotated capitals in the wiki, together with the articles about
> what they are captital of.
> <ask>[[Category:City]] [[is located in:France]]</ask>
> Returns all cities in France.
> Returns all articles that have some population assigned, together with this
> <ask>[[Category:City]] [[population:=>100,000]] [[is located
> Returns all German cities with at least 100,000 inhabitants.
> Well, you get the idea ...
> In addition, one can explicitly modify the formatting of the output by giving
> parameters to <ask>. E.g.
> <ask format="ul"> ... </ask>
> for an un-orderd list
> <ask format="ol"> ... </ask>
> for an ordered list
> <ask format="table"> ... </ask>
> for a dynamic table
> Finally, one can ask more complex queries by nesting questions. The tag for
> this is <q>. E.g.
> <ask>[[accepted by::<q>[[organized by::Max Völkel]]</q>]]</ask>
> Returns everytihng that was accepted on an event organized by Max.
> And all together now:
> [[is located in:Germany]]
> [[has mayor::<q>[[Category:Woman]]</q>]]
> returns all large German cities which have a female mayor.
> There are some more features to be described in detail soon, but this might
> get you started a bit :-)