Collision between Semantic MediaWiki and C ++ namespace syntax
To describe some C ++ classes and provide instructions, we have successfully used the MediaWiki-based wiki for many years. Documented classes are usually defined in the C ++ namespace, so we use wiki pages named after the convention cppnamespace::classname
.
A year ago, the Semantic MediaWiki (SMW) extension was included for the wiki.
Today I started looking at wiki statistics and I came across some suspicious attributes "used but not defined". As I found out, this is caused by a clash of the special syntax value of the SMW attribute applied to the name separator <+ strong> <→, causing problems on wiki pages with links to pages named as fully qualified classes. SMW always abbreviates the name to the class name. [1]
If I write in wiki text,
[[MyNamespace::MyClass]] [[MyNamespace::MyClass|MyNamespace::MyClass]] [[MyClass|MyNamespace::MyClass]]
... the displayed wiki page will be displayed,
MyClass MyClass MyClass
... and the page associated with MyClass in each case.
I usually dealt with such problems by introducing the new MediaWiki template [2] . But I'm not sure about the best solution in this special case because there will be many pages on it. Therefore, I am interested in previous experience. (neither Google nor SO has helped so far)
If you had the same problem, what solution did you find?
- [1] Addition: Release Notes: MediaWiki 1.23.4 with Semantik MediaWiki 2.0
- [2] Addendum: I learned while trying that creating a MediaWiki template for this purpose is difficult, if not impossible ...
source to share
According to http://semantic-mediawiki.org/wiki/Help:Properties_and_types
To make a regular reference with :: without creating a property, avoid the preceding colon markup, such as Operator [[: C ++ ::]].
source to share