Hi everyone,

Thanks for the feedback. That's true about the semicolons - it's obviously a problem. It's also true that the code sometimes led to a "Class 'SMWQueryResult' not found" error, due to the way autoloading works. I believe I've fixed both problems in version 0.2 of Semantic Compound Queries, which I've just released. The first problem has been solved by doing slightly more complicated parsing than just "explode()" - semicolons are still being used as a delimiter (I like them more than any of the alternatives). The second was solved by changing the code from one file to three, putting each class in its own file so that they're autoloaded correctly. I put the files into a directory as a result, and checked it all into SVN; I guess this is a real extension now. :) You can download the new version here:

http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries

-Yaron


On Fri, Nov 21, 2008 at 3:43 AM, <zehetner@molgen.mpg.de> wrote:
Yaron as far as I can see you would just need to replace the ';' which you use
instead of the '|' with another character e.g. '#' to make it also work with
n-ary properties.

So after changing in your code the line
 $sub_params = explode(';', $param);
to
 $sub_params = explode('#', $param);

and the query from
 {{#compound_query: [[Band::4C]] [[Gene Start (bp)::>50000]] ; ?Band ;
?GOannotation | [[GOannotation::?;?;?;Biological process]] ; ?Band ;
?GOannotation | format = ol}}
to
 {{#compound_query: [[Band::4C]] [[Gene Start (bp)::>50000]] # ?Band #
?GOannotation | [[GOannotation::?;?;?;Biological process]] # ?Band #
?GOannotation | format = ol}}

it seems to work ok and gives the expected result.

Cheers,
Gu




Quoting Yaron Koren <yaron57@gmail.com>:

> Gu - Thanks; I never tested it with multi-value properties - hopefully I can
> try it out at some point and see what the problem is.
>
> Temlakos - it's odd that the code causes regular #ask queries to not work...
> my guess is that it's due to the hook processing, which is somehow failing
> in MediaWiki 1.12 - I've only tested it in MW 1.13 and 1.14. Unfortunately I
> can't think of a solution, short of waiting to see if other people have the
> same problem in MW 1.12 or earlier and are able to debug it.
>
> -Yaron
>