views:

15

answers:

1

Hi,

I installed the MediaWiki-extension Semantic MediaWiki recently. In this extension you can define properties. They are like categories for values. If I define two properties like this:

[[StartYear::2000]] [[EndYear::2005]]

Is it possible to make calculations based on these properties if I do a semantic search. For example:

{{#ask: [[Category:Project]] [[EndYear]] - [[StartYear]] = 5 }}

to get all projects with a duration of 5 years?

best, UP

A: 

AFAICT, you can't do calculations in #ask queries, but you can do calculations, using the ParserFunction #expr:. It'd be, er, complicated to mix these together, but it should be possible. Comment if you successfully try it, and if I get a chance, I'll edit this answer with whatever I find out.

JesseW