Last modified: 2011-03-18 18:07:42 UTC
Created attachment 8029 [details] I realised both of the result formats already. New result format similar to the 'list' format but with more options how to list values. It should be possible to define separators between... 1. ...values per page 2. ...properties of a page 3. ...multi value properties. 4. ...record values. It should be possible to define whether requested properties not defined on a page should create an empty list entry or not. And the format should be working together with Extension:ArrayExtension and Extension:HashTables to create an array or hash directly.
Created attachment 8073 [details] improved version of the first patch. This one only introduces four config variables which allow to define default separators within the LocalSettings.php It is possible to define one of the wikis pages as source for a seperator. This is very useful when using templates for consistent array separators within template code.
I just applied the patch: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/84252 I have not included these 2 formats in the list of default enables ones though, since I have some concerns: * My IDE complains about the $var::CONST used (it's indicated as a fatal error), but it runs on my server. This makes me think you can only do this with PHP 5.3 (which my server has), and not 5.2 (to which my IDE is configured). Can you confirm it works with 5.2, or rewrite the accessing of these constants? * They are not documented (as far as I can tell), can you add some basic docs here: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:SemanticResultFormats#Formats ? Also, it looks like you need ArrayExtension for the array format, and some other one (that I don't know of) for the hash format. This in itself is a reason to not enable the formats by default :)