|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Is there an ask query for pages in [[Category:A]] AND NOT [[Category:B]]?I would like to query for all pages that have been assigned
[[Category:A]] but not [[Category:B]]. I tried various 'obvious' syntax, such as: {{#ask: [[Category:A]] ![[Category:B]] ... / {{#ask: [[Category:A]] [[Category:!B]] ... But nothing seems to work. I can query for a simple combination of categories. If I wanted a list of pages that were in [[Category:A]] AND/OR [[Category:B]], I would just say: {{#ask: [[Category:A]] [[Category:B]] ... / {{#ask: [[Category:A||B]] ... http://test.referata.com/wiki/Tq It seems that if I created a property called 'has category', I could do what I wanted. Is there a special reason why categories are handled different from properties with regards to querying (specifically negating)? Or have I just made a mistake in my syntax / reading? I can't seem to find this mentioned in the manual or discussed in the mailing list. Thanks for any comments, Dan. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Semediawiki-user mailing list Semediawiki-user@... https://lists.sourceforge.net/lists/listinfo/semediawiki-user |
|
|
Re: Is there an ask query for pages in [[Category:A]] AND NOT [[Category:B]]?It is not possible to query on properties that are not set - only on
existing values. For complex operations on categorization, I found it is more convenient to keep only one category per page, as a master Type for that page , and use properties for more complex structures. - Laurent Alquier Http://www.Alquier.org On Nov 5, 2009, at 11:11 AM, Dan Bolser <dan.bolser@...> wrote: > I would like to query for all pages that have been assigned > [[Category:A]] but not [[Category:B]]. I tried various 'obvious' > syntax, such as: > > {{#ask: [[Category:A]] ![[Category:B]] ... / > {{#ask: [[Category:A]] [[Category:!B]] ... > > > But nothing seems to work. > > > I can query for a simple combination of categories. If I wanted a list > of pages that were in [[Category:A]] AND/OR [[Category:B]], I would > just say: > > {{#ask: [[Category:A]] [[Category:B]] ... / > {{#ask: [[Category:A||B]] ... > > > http://test.referata.com/wiki/Tq > > > It seems that if I created a property called 'has category', I could > do what I wanted. Is there a special reason why categories are handled > different from properties with regards to querying (specifically > negating)? Or have I just made a mistake in my syntax / reading? > > I can't seem to find this mentioned in the manual or discussed in the > mailing list. > > > Thanks for any comments, > Dan. > > --- > --- > --- > --------------------------------------------------------------------- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Semediawiki-user mailing list > Semediawiki-user@... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Semediawiki-user mailing list Semediawiki-user@... https://lists.sourceforge.net/lists/listinfo/semediawiki-user |
|
|
Re: Is there an ask query for pages in [[Category:A]] AND NOT [[Category:B]]?Hi Dan,
negation of a condition, i.e. NOT [[Some Category or Property Annotation]] is currently not possible in SMW. But I think that Denny and Markus have this item on their to-do list; but it is unsure when this issue will get done. It is harder to implement than the not equal operator, which is available for testing unequality of property values [1]. For realizing negation you need to use SPARQL within SMW at the moment. Regards, Philipp [1] http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Not_equal Dan Bolser schrieb: > I would like to query for all pages that have been assigned > [[Category:A]] but not [[Category:B]]. I tried various 'obvious' > syntax, such as: > > {{#ask: [[Category:A]] ![[Category:B]] ... / > {{#ask: [[Category:A]] [[Category:!B]] ... > > > But nothing seems to work. > > > I can query for a simple combination of categories. If I wanted a list > of pages that were in [[Category:A]] AND/OR [[Category:B]], I would > just say: > > {{#ask: [[Category:A]] [[Category:B]] ... / > {{#ask: [[Category:A||B]] ... > > > http://test.referata.com/wiki/Tq > > > It seems that if I created a property called 'has category', I could > do what I wanted. Is there a special reason why categories are handled > different from properties with regards to querying (specifically > negating)? Or have I just made a mistake in my syntax / reading? > > I can't seem to find this mentioned in the manual or discussed in the > mailing list. > > > Thanks for any comments, > Dan. > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Semediawiki-user mailing list > Semediawiki-user@... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > -- Professional Services ontoprise GmbH – know how to use Know-how - - - ontoprise has become a Microsoft Certified Partner: http://www.ontoprise.de/en/home/news/news-en/microsoft-certified-partner/ - - - An der RaumFabrik 29; 76227 Karlsruhe; Germany Tel.: +49 721 509809-0; Fax: +49 721 509809-11 mailto:zaltenbach@..., www: http://www.ontoprise.de Registered Office: Karlsruhe, Germany, HRB 109540 Managing Directors: Prof. Dr. Juergen Angele, Hans-Peter Schnurr - - - ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Semediawiki-user mailing list Semediawiki-user@... https://lists.sourceforge.net/lists/listinfo/semediawiki-user |
|
|
Re: Is there an ask query for pages in [[Category:A]] AND NOT [[Category:B]]?2009/11/5 Laurent Alquier <laurent@...>:
> It is not possible to query on properties that are not set - only on > existing values. > > For complex operations on categorization, I found it is more convenient to > keep only one category per page, as a master Type for that page , and use > properties for more complex structures. Right. The current prevailing data modelling style is one category per page, making the query I described meaningless. I just find it strange (or perhaps not...) that I can define a property called 'has category' and use it to get exactly what I need. In this case it would look something like this: {{#ask: [[has category::A]] [[has category::!B]] ... The reason I'm labouring this point is that it seems to be a common request on the Wikipedia / MediaWiki discussion lists / feature requests. Wikipedia seems to have more than one category per page on occasion, so it would be quite nice if SMW 'fixed' this problem. Thanks all for comments, Dan. > - Laurent Alquier > Http://www.Alquier.org > > > On Nov 5, 2009, at 11:11 AM, Dan Bolser <dan.bolser@...> wrote: > >> I would like to query for all pages that have been assigned >> [[Category:A]] but not [[Category:B]]. I tried various 'obvious' >> syntax, such as: >> >> {{#ask: [[Category:A]] ![[Category:B]] ... / >> {{#ask: [[Category:A]] [[Category:!B]] ... >> >> >> But nothing seems to work. >> >> >> I can query for a simple combination of categories. If I wanted a list >> of pages that were in [[Category:A]] AND/OR [[Category:B]], I would >> just say: >> >> {{#ask: [[Category:A]] [[Category:B]] ... / >> {{#ask: [[Category:A||B]] ... >> >> >> http://test.referata.com/wiki/Tq >> >> >> It seems that if I created a property called 'has category', I could >> do what I wanted. Is there a special reason why categories are handled >> different from properties with regards to querying (specifically >> negating)? Or have I just made a mistake in my syntax / reading? >> >> I can't seem to find this mentioned in the manual or discussed in the >> mailing list. >> >> >> Thanks for any comments, >> Dan. >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and focus >> on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Semediawiki-user mailing list >> Semediawiki-user@... >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Semediawiki-user mailing list Semediawiki-user@... https://lists.sourceforge.net/lists/listinfo/semediawiki-user |
| Free embeddable forum powered by Nabble | Forum Help |