From: david <dv...@en...> - 2008-07-25 09:58:39
|
Hi; How can I make a query (using {{#ask:) to show the pages that aren't in an specific category? I want to show the pages in [[category:card]] but hidding the pages in [[category:incomplete card]]. Thanks. dvdgmz |
From: S P. <in...@sk...> - 2008-07-27 05:56:01
|
david wrote: > How can I make a query (using {{#ask:) to show the pages that aren't in > an specific category? > > I want to show the pages in [[category:card]] but hidding the pages in > [[category:incomplete card]]. I don't think there's any way to do this. As http://semantic-mediawiki.org/wiki/Help:Selecting_pages says "Comparators work only for property values, but not for conditions on categories." So you can't use the '!' NOT comparator to say [[category:!incomplete card]] the same way you can say, e.g., [[date of birth::!1935-12-01]] A couple of ideas: * Set the inline query to display ?Category, use format=template to print results, and if this template parameter contains "incomplete card", don't print. * You could have a boolean notIncompleteCard that tracks the category assignment. Code could set this to true or false based on category values using a similar technique to "using an inline query to produce inverse annotations" (see http://semantic-mediawiki.org/wiki/California). Then query for this property. Regards, -- =S Page |
From: 張. M. C. <ro...@gm...> - 2008-07-27 10:15:20
|
Hi Daivd, Please see http://www.mediawiki.org/wiki/Extension:CategoryTests for your reference. 2008/7/27 S Page <in...@sk...> > david wrote: > > > How can I make a query (using {{#ask:) to show the pages that aren't in > > an specific category? > > > > I want to show the pages in [[category:card]] but hidding the pages in > > [[category:incomplete card]]. > > I don't think there's any way to do this. As > http://semantic-mediawiki.org/wiki/Help:Selecting_pages says > > "Comparators work only for property values, but not for conditions on > categories." > > So you can't use the '!' NOT comparator to say [[category:!incomplete > card]] the same way you can say, e.g., [[date of birth::!1935-12-01]] > > > > A couple of ideas: > > * Set the inline query to display ?Category, use format=template to > print results, and if this template parameter contains "incomplete > card", don't print. > > * You could have a boolean notIncompleteCard that tracks the category > assignment. Code could set this to true or false based on category > values using a similar technique to "using an inline query to produce > inverse annotations" (see > http://semantic-mediawiki.org/wiki/California). Then query for this > property. > > Regards, > -- > =S Page > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |
From: david <dv...@en...> - 2008-07-27 10:29:47
|
Thanks a lot. I'll try these ways. But... El ds 26 de 07 del 2008 a les 22:53 -0700, en/na S Page va escriure: > A couple of ideas: > > * Set the inline query to display ?Category, use format=template to > print results, and if this template parameter contains "incomplete > card", don't print. How can I check if "parameter CONTAINS"? With "parserFunctions" I can only check if is-equal (#ifeq) not if-contains. http://meta.wikimedia.org/wiki/Help:ParserFunctions#.23ifeq: > > * You could have a boolean notIncompleteCard that tracks the category > assignment. Code could set this to true or false based on category > values using a similar technique to "using an inline query to produce > inverse annotations" (see > http://semantic-mediawiki.org/wiki/California). Then query for this > property. Mmmmhh. I'll study it. > |
From: Markus K. <ma...@se...> - 2008-08-05 08:27:03
|
As a further explanation: SMW currently has no way to ask for pages that do *not* meet a certain criterion! Even the comparator ::! checks for the *existence* of a value that is unequal to the given one, it does not check for the absence of a value. I know that negation would be useful to have. What would our syntax be? Maybe just write "NOT" in a query (like "OR" now)? On semanticweb.org, we use templates that check if something is not the case (using parserfunctions) and then assign a category to such pages. Hence we turn the absence of certain inputs into positive information by template code. Somewhat hacky but doable. -- Markus On Sonntag, 27. Juli 2008, david wrote: > Thanks a lot. I'll try these ways. > But... > > El ds 26 de 07 del 2008 a les 22:53 -0700, en/na S Page va escriure: > > A couple of ideas: > > > > * Set the inline query to display ?Category, use format=template to > > print results, and if this template parameter contains "incomplete > > card", don't print. > > How can I check if "parameter CONTAINS"? > With "parserFunctions" I can only check if is-equal (#ifeq) not > if-contains. > > http://meta.wikimedia.org/wiki/Help:ParserFunctions#.23ifeq: > > * You could have a boolean notIncompleteCard that tracks the category > > assignment. Code could set this to true or false based on category > > values using a similar technique to "using an inline query to produce > > inverse annotations" (see > > http://semantic-mediawiki.org/wiki/California). Then query for this > > property. > > Mmmmhh. I'll study it. > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge Build the coolest Linux based applications with Moblin SDK & win > great prizes Grand prize is a trip for two to an Open Source event anywhere > in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user -- Markus Krötzsch Semantic MediaWiki http://semantic-mediawiki.org http://korrekt.org ma...@se... |
From: F. V. (S. <fri...@pf...> - 2008-08-05 08:58:45
|
2008/8/5, Markus Krötzsch <ma...@se...>: > As a further explanation: SMW currently has no way to ask for pages that do > *not* meet a certain criterion! Even the comparator ::! checks for the > *existence* of a value that is unequal to the given one, it does not check > for the absence of a value. > > I know that negation would be useful to have. What would our syntax be? Maybe > just write "NOT" in a query (like "OR" now)? Yes. I'd like to have "NOT" (as in SQL). Friedel |
From: david <dv...@en...> - 2008-09-03 10:02:59
|
+1 vote for "NOT". dvdgmz. El dt 05 de 08 del 2008 a les 10:58 +0200, en/na Friedel Völker (Stadtwiki) va escriure: > 2008/8/5, Markus Krötzsch <ma...@se...>: > > As a further explanation: SMW currently has no way to ask for pages that do > > *not* meet a certain criterion! Even the comparator ::! checks for the > > *existence* of a value that is unequal to the given one, it does not check > > for the absence of a value. > > > > I know that negation would be useful to have. What would our syntax be? Maybe > > just write "NOT" in a query (like "OR" now)? > > Yes. I'd like to have "NOT" (as in SQL). > > Friedel > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user |