On Tuesday 27 June 2006 01:50, S Page wrote:
> Markus Kr=F6tzsch wrote:
> > after 48 hours of coding (*puh*), I have uploaded an intermediate relea=
> > of SMW on SourceForge.
> Great! It seems that some of this is in place on
> > * Inline queries are more powerful. There are quite some new features f=
> > output formatting and searching:
> > ** If you want to search for all articles that have *some* annotation f=
> > a given property, use the syntax [[relation::+]] or [[attribute:=3D+]].=
> > If you say [[relationname::*]] or [[attributename:=3D*]], all values of
> > these annotations are printed, no matter how many there are.
> Queries on wiki.ontoworld.org are doing this, e.g.
> <ask>[[Is located in::*]]</ask>
> returns every page. So several pages on ontoworld have big tables in
> them now.
> If I change it to
> <ask>[[Is located in::+]]</ask>
Yes, sorry, this needs to be documented. But it is very simple:
There are two kinds of statements that you can put into an inline query:
(1) conditions that state which articles you are interested in, and
(2) print-out requests, that state what further information about your=20
selected articles should be displayed.
Most conditions are of type (1). Type (2) statements are exactly those with=
"*" in them. So [[is located in::*]] is type (2), stating that you want to=
get the "is located in" property value for all the articles you selected.=20
But if you do not give further statements, you select all articles (of whic=
you will only see the first 50 or so ;). Now [[is located in::+]] is a type=
(1) statement that selects all articles which have some value for the "is=20
located in" property, but it does not state that you want to get this=20
So to achieve someting that is similar to the former <ask>[[is located=20
in::*]]</ask>, you now have to write <ask>[[is located in::+]] [[is located=
in::*]]</ask>. This is the only place where things become more complex than=
they used to be. But the advantage is that you can now also print the=20
locations of all cities, whether or not they actually have one:
<ask>[[Category:Cities]] [[is located in::*]]</ask>
This was not possible before. Adding further print-out statements such as=20
[[features:=3D*]] does not make your table shorter -- you still get all cit=
=2D- but it gives you additional information in some cases.=20
=46or instance, in our group-intenal wiki, we use attributes to store email=
addresses, telephone numbers, messenging accounts, etc. for all group=20
members. In the old version, you could not print this data in one table: if=
you wanted to display people's ICQ-numbers, you would automatically restric=
to those people who have an ICQ account at all. If you would print telephon=
numbers and emails in one table, a person with 2 emails and 3 phone numbres=
would get 6 rows in the table, since the join was computed. The new version=
solves this task easily, and doing less joins makes it more efficient as=20
So whenever you meet one of the old condition-less *-queries at ontoworld,=
please add a suitable condition (like the +-version) to make the query=20
> I don't get a table with article links and the property values, I just
> get a comma-separated list of articles. <ask format=3D"table"> brings
> back table format, but still no property values.
> I added
>Values to reflect the change.
> I'm sure Markus is aware of this, just letting y'all know.
Institute AIFB, University of Karlsruhe, D-76128 Karlsruhe
mak@... phone +49 (0)721 608 7362
http://www.aifb.uni-karlsruhe.de/WBS/ fax +49 (0)721 693 717