I think the answer is "no", which is unfortunate; it would be very nice to be able to use subqueries to display data, not just filter on it.


On 10/24/07, Nathan Yergler <nathan@creativecommons.org> wrote:
Thanks, Yaron!

Is there a way to show a sub-query attribute in the results table?
For example, if an article links to a User:XXX page as an author, and
the User:XXX has a display_name attribute, is it possible to show
display_name instead of the actual object of the relationship?

I have something like this right now:

<ask sort=Publication format=broadtable mainlabel=Title>
[[Category:Press Hit]]
[[Author::<q>[[User:+]] [[Category:Staff]]</q>]]
[[Author::*]]
[[Publication:=*]]
[[Date:=*]]
</ask>

and tried something like:

<ask sort=Publication format=broadtable mainlabel=Title>
[[Category:Press Hit]]
[[Author::<q>[[User:+]] [[Category:Staff]]</q>]]
[[Author::<q>[[fullname:=*]]</q>]]
[[Publication:=*]]
[[Date:=*]]
</ask>

with no luck.  Maybe this is a task for the template output type?

Thanks,

Nathan

On 10/24/07, Yaron Koren < yaron57@gmail.com> wrote:
> Yeah, this is possible - what you're talking about are called subqueries in
> SMW; you can see how to use them here:
>
> http://ontoworld.org/wiki/Help:Semantic_search#Subqueries
>
> My understanding is that these can be done recursively (subqueries within
> subqueries, to many levels), but I've never tried it, and the documentation
> doesn't mention it.
>
> -Yaron
>
>
>
>  On 10/23/07, Nathan Yergler <nathan@creativecommons.org> wrote:
> >
> > Is it possible in SMW 1.0 to do transitive queries?  By transitive I
> > mean filtering using properties of properties (aka sub-queries).  For
> > example, we have a set of pages that live in [[Category:Press Hit]].
> > Each page may have an author attribute, for example
> > [[author::Nathan_Yergler]].  An author may also have an organization,
> > such as [[organization:=Creative Commons]].
> >
> > My goal is to get a list of press hits authored by Creative Commons staff.
> >
> > Suggestions on how to write that in an <ask> query?
> >
> > Thanks.
> >
> > Nathan
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Semediawiki-user mailing list
> > Semediawiki-user@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
> >
>
>