Help:Hash format

The result format hash, part of the Semantic Result Formats extension, is used to format query results in a way most suitable for further processing by MediaWiki templates or parser functions. It is quite similar to the list format but allows more options for customization. It can either output the result as string with a variety of separators between different values, or store the result directly into an hash (HashTables).

Parameters
Default parameters are optimized for use with HashTable extension or other way of processing the output, not for machine-unfriendly eye-candy like Semantic MediaWiki's proprietary list format. This means all kinds of links and generating of needless information is disabled by default, can be activated though.

 *  The limit for array and hash query results is set to the maximum set in Semantic MediaWiki's  config variable by default.

Configuration
There are five configuration variables to configure the default separators. They can be adjusted via LocalSettings.php if required. Although they don't have the hash as part of their names, it applies for the hash format.


 * $srfgArraySep : Default value for the  parameter. Default: ' '
 * $srfgArrayPropSep : Default value for the  parameter. Default: ' '
 * $srfgArrayManySep : Default value for the  parameter. Default: ' '
 * $srfgArrayRecordSep : Default value for the  parameter. Default: ' '
 * $srfgArrayHeaderSep : Default value for the  parameter. Default: ' '

Example
These variables can be set to a normal string value or the can contain an array, defining one page in the wiki. In case the later is chosen, the parsed content of this site will serve as default value. The value will only be parsed once per page rendering and shouldn't contain any very dynamic content. It is useful though to define a template which can then be used in templates processing the query result any further. Example for definition:

Issue with Special:Ask
In case any configuration variable is set to get a wiki page content as value, this will not work as expected on Special:Ask. This is because the parser is not fully running at the time the value is needed. In this case, if the query is not running in inline-mode, a fallback separator will be loaded from another configuration variable,. This is an array with the keys sep, propsep, manysep, recordsep and headersep which contain the equivalent default value from above (NOT the one set in LocalSettings.php of course). This variable can be modified in LocalSettings.php as well, though, there is no real benefit from doing so since these values are only going to be used on the semantic search spacial page anyway. One should just be aware of this to avoid confusion.

Examples
Define a Hash with name, Pagenames as associative keys and the value of each result page Name property as value:

Examples
To be added