From: <zeh...@mo...> - 2009-01-29 07:37:27
|
... SQFT works also for multi-valued properties e.g. on page Dogs [[animal::Harry;German Shepard;brown;10-03-2005]] ... on page Cats [[animal::Kitty;Siam;white;15-02-2007]] ... {{#arraydefine: unique_dog_colors | {{#sask: [[Dogs]] | ?animal | nary=3 | format=list | lastsep=}} }} {{#arraydefine: unique_cat_colors | {{#sask: [[Cats]] | ?animal | nary=3 | format=list | lastsep=}} }} {{#arraydefine: unique_animal_colors | {{#sask: ?animal | nary=3 | format=list | lastsep=}} }} Gu Quoting zeh...@mo...: > For those who are using the SemanticQueryFormTool extension: > to do the same with the SQFT extension version 0.1.9 is needed to work > > {{#arraydefine: colors|{{#sask: ?Colors | format=list | lastsep=}} }} > > Gu > > > Quoting Jie Bao <ba...@cs...>: > > > It should be very easy with using list formating of query > > > > {{#arraydefine: colors|{{#ask:[[Category: > > Colors]][[:+]]|link=none|format=list|sep =,}} }} > > > > On Wed, Jan 28, 2009 at 12:15 PM, Rolf Lampa [RIL] > > <rol...@ri...> wrote: > > > Looks good ! :) > > > > > > Q: can you also *populate* the array with a smw-query result? Like > > > (replacing one of your examples below): > > > > > > {{#arraydefine|colors|<!-- "red,blue,yellow, yellow" replaced with: --> > > > {{#ask: [[Colors]] }} > > > }} > > > > > > Regards, > > > > > > // Rolf Lampa > > > > > > > > > > > > > > > Li Ding skrev: > > >> Dear all, > > >> > > >> we recently built an array extension to facilitate manipulating an > > >> array (e.g. a list of values). > > >> http://www.mediawiki.org/wiki/Extension:ArrayExtension > > >> > > >> here are some highlights: > > >> * similar to Variables Extension, users can create a named array and > > >> then access it by its name(key) > > >> e.g. {{#arraydefine|colors|red,blue,yellow, yellow}} > > >> > > >> * user can do regular array operations such as index, size, > > >> memgership test, merge, sort, unique > > >> e.g. {{#arraysize|colors}} > > >> e.g. {{#arraymember|colors|red}} > > >> e.g. {{#arrayunique|colors}} > > >> > > >> * user can print an array with many customization options > > >> e.g. {{#arrayprint|colors|<br/>|\[\[has color::|]]}} <!-- create a > > >> list of SMW links [[has color::red]]--> > > >> > > >> * users can run set operations on arrays > > >> e.g. {{#arrayintersect|colors|a_colors|b_colors}} > > >> > > >> best, > > >> > > >> Li Ding and Jie Bao > > >> > > >> > > > > > > > > > ------------------------------------------------------------------------------ > > > This SF.net email is sponsored by: > > > SourcForge Community > > > SourceForge wants to tell your story. > > > http://p.sf.net/sfu/sf-spreadtheword > > > _______________________________________________ > > > Semediawiki-user mailing list > > > Sem...@li... > > > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > > > > > > > > > > -- > > Jie > > http://www.cs.rpi.edu/~baojie > > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by: > > SourcForge Community > > SourceForge wants to tell your story. > > http://p.sf.net/sfu/sf-spreadtheword > > _______________________________________________ > > Semediawiki-user mailing list > > Sem...@li... > > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > > > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |