Extension:Semantic Expressiveness

Semantic Expressiveness is an enhancement for Semantic MediaWiki. Its main feature is to introduce a new syntax for inline short queries. The purpose of this simplest form of inline query is to provide a powerful tool for fighting redundancies within the wiki. Without Semantic Expressiveness it is customary to declare properties in one place but using the same information again all over the same article or on other pages as simple text representation. With Semantic Expressiveness it is possible to use simple references in form of a new syntax to place the same information in various places without writing redundant information. This way if the property changes, the information will update itself all over the wiki wherever the new syntax is in place.

There are also further features like parser functions for template developers and a JavaScript context popup using AJAX to display further information on cross-article inline queries.

Inline Short Query Syntax
The inline short query syntax is quite similar to Semantic MediaWikis show parser function. It displays one property value of the article its defined on or of another article. The simplest variant of it would be just  which would simple print the value of the property called   can be used. In case the property is not declared on the target page, this syntax will print an abstract text communicating what information it represents.

Nested Syntax
It is possible to use the syntax in a nested way like  or alternatively. Considering  is a page representing a human and it has a property   of type Page which refers to another page which also represents a human and has the same property, this will print the name of the Little Boys grandfather.

By Reference
It will be possible to query the property of a page referred to by a property of the type Page defined on the current page.

Usage Within Template Parameters
The syntax is being parsed after parser functions and templates. It respects special MediaWiki constructs such as comments, nowiki, includeonly, noinclude and pre. Therefore when used as template parameter provided data, the template will not receive the short queries result but the syntax itself. If the template doesn't intend to further process the value and the author would not expect the template to process the result, the template can still return text with the original parameter input holding the short query syntax and at a later state of the parser process it will be replaced with its actual result.

If on the other hand it is expected that the template should work with the short queries result, this will only work by using the Semantic Expressiveness parser function  on the provided parameter value. The parser function will then trigger an early parsing of the syntax and can return the result in various different formats, most notably as plain text without any abstract value in case of failure, so the template can carry on with processing the information.

?to?! Parser Function
TBD - The name of this function will probably change

Early Extension State
Although this is just an early release, the very concept of this has proven helpful for quite some time already. This has started as part of Daniel Werners RPG-Dev-Wiki project until he decided to release some of the features in a proper extension.

Although the main functionality works, there is still a lot of polishing and bug fixing to do until this can be used in a productive environment. Also, parts of the concept and syntax might change, if anyone has thoughts on this, don't hesitate to use the talk page or contact the author.

Installation
Once you have downloaded the code, place the SemanticExpressiveness directory within your MediaWiki extensions directory. Then add the following code near the bottom of your LocalSettings.php file:

Configuration
TBD