Con­figu­ration para­meter "$smwgEnabledInTextAnnotationParserStrictMode"

From semantic-mediawiki.org
Configuration parameter details:
Name $smwgEnabledInTextAnnotationParserStrictMode
Description Sets whether strictness should be enforced during the annotation parsing process
Default setting
true
(Other) available settings
false

Allows to disable strictness during the annotation parsing process

Software Semantic MediaWiki
Since version
Until version still available
Configuration Installation
Keyword parser · in-text annotation · multi property value


$smwgEnabledInTextAnnotationParserStrictMode is a configuration parameter that sets whether strictness should be enforced during the annotation parsing process. The configuration parameter was introduced in Semantic MediaWiki 2.3.1Released on 4 January 2016 and compatible with MW 1.19.0 - 1.25.x..1 and deprecated with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..2

This configuration parameter was deprecated with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. in favour of option SMW_PARSER_STRICT to configuration parameter $smwgParserFeaturesSets the behaviour of features related to text and annotion parsing streamlining the overall configuration of Semantic MediaWiki.2 Thus you are advised to migrate your settings in "LocalSettings.php" to the new configuration parameter since this one will be removed with the release of Semantic MediaWiki 3.1.0Released on and compatible with . in late 2018.

Default setting[edit]

$smwgEnabledInTextAnnotationParserStrictMode = true;

This means that only a single triple such as e.g. [[PropertyName::ProperyValue::alsoPartOfThePropertyValue]] is being assumed (strict interpretation), i.e. the property value "ProperyValue::alsoPartOfThePropertyValue" is being added to a property called "PropertyName".

Changing the default setting[edit]

To modify this configuration setting, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Disable the strict interpretation of annotations
$smwgEnabledInTextAnnotationParserStrictMode = false;

This means that multiple properties can be assigned using a [[PropertyName1::PropertyName2::PropertyValue]] notation. Thus the property value "PropertyValue" is being added to the properties called "PropertyName1" and "PropertyName2". This however may cause value strings to be interpret unanticipated in case of additional colons.

See also[edit]

References

  1. ^  Semantic MediaWiki: GitHub issue gh:smw:1252
  2. a b  Semantic MediaWiki: GitHub pull request gh:smw:2802