Creating new content (tables) through other tables

From semantic-mediawiki.org

I've got the link to this community-portal from Clemonde and tried it on a fresh mediawiki with smw extension.

My sobobject tuples look like this.

{{#subobject: 
| Project = {{FULLPAGENAME}} 
| Year = 1995
| Role = Det. Mike Lowrey
| Actor = Will Smith
| Voice Actor = Leon Boden
}}

{{#subobject: 
| Project = {{FULLPAGENAME}} 
| Year = 1995
| Role = Det. Marcus Burnett
| Actor = Martin Lawrence
| Voice Actor = Torsten Michaelis
}}

The following statement made it possible to put these subobjects in one table:

{{#ask: [[Actor::{{{Actor|+}}}]] 
| mainlabel= -
| ?Actor
| ?Role
| ?Voice Actor 
| format = sortable 
| sort = Year
| order = desc
}}

What exactly does [[Actor::{{{Actor|+}}}]] do? I red the user-manual but could not figured it out properly


I tried to write two actor/voice-actor/role tuple in one subobject. But as a result the site of the Actor/Voice-Actor did show all tuple and not just the one WHERE Actor.Name = Will Smith

The ask command in the actor template:

{{#ask: [[Actor::{{FULLPAGENAME}}]] 
| mainlabel=-
| ?Year
| ?Project
| ?Role 
| ?Voice Actor
| format = sortable
| sort = Year
| order = desc
}}


Is there an easy way to fill the project table manually (by hand) and extract the needed data in the pages of Actor/Voice actor? A subobject for every tuple is a bit overwhelming.

Maybe a pseudo SQL statement helps:

SELECT Actor.Name, Role.Name, VoiceActor.Name
FROM Project
WHERE Actor.Name = Will Smith
02:50, 20 September 2015

> What exactly does [[Actor::{{{Actor|+}}}]]</code> do? This is the WHERE clause of the query.

My example assumes that the {{{#ask:…}} statement is used on the template called, say Template:Actor's roles, which receives Actor as an argument: {{Actor's roles|Actor=John Smith}}.

If Actor is not given ({{Actor's roles}}), + will be used to choose all role subobjects where Actor property is set.

Another possible solution is to use the page title as the default value for Actor argument: [[Actor::{{{Actor|{{FULLPAGENAME}}}}}]]. In this case the template call on a page about an actor will look simply like this: {{Actor's roles}}.

22:40, 21 September 2015