Semantic Mediawiki: Defining derived properties through queries -


(i'm kind of new whole semantic mediawiki thing , have been scouring web leads on small project i'm doing. )

how go defining properties derived other properties in semantic mediawiki. assuming have created course smw , provide details on progress of course (i.e. current page / total number of pages in %).

i read there semantic special properties extension subpages property exist. help? i'm guessing go #ask or sorts , check on subpage of whole course?

any further (better) ideas?

you can define semantic property using #ask query. here example in 1 of wikis doing described, showing count , percentage of total population. in case i'm defining 2 variables first make code more readable , since need website_count value twice avoid 2nd query.

{{ #vardefine: website_extension |   {{#ask: [[has extension::{{fullpagename}}]] | format=count }} }}{{ #vardefine: website_count |   {{#ask: [[category:website]] [[is validated::true]] [[is active::true]] [[collect extension data::true]] | format=count }} }} [[has website count::{{#var:website_extension}}]] ([[has website percent::{{#expr: ( ( {{#var: website_extension}} / {{#var: website_count}} ) * 100 ) round2 }}]]%) 

subobjects , semantic special properties not needed of this.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -