[SMW] Separator for multiple values per property in subobjects
Closed, ResolvedPublic


This topic was previously discussed on the SMW mailing list in July/August 2012 (look for "[Semediawiki-user] Future plans for Semantic MediaWiki #subobject and Semantic Internal Objects")

Currently, subobjects can handle multiple property values in the following two ways:

{{#subobject: ...



and more recently,

{{#subobject: ...



However, neither approach is very suitable for embedding value parameters in templates. Using a pipe as a delimiter conflicts with parser syntax. What is needed, therefore, is an alternative way of delimiting values on the condition that it not does by default restrict the scope of usable characters (as Markus, no doubt rightly, insists).

As a possible solution, Markus considers "some syntax for enabling ;-based lists or we could have another parser function that does just this." Here are two semi-concrete ideas:

  1. Yaron Koren proposes adding a suffix in roughly the same way as this is done with SIO. The difference is that semicolons rather than commas would be used, as commas can be quite common in pagenames and other values.

{{#subobject: ...

property1#list=value 1; value 2; value 3;


In template
{{#subobject: ...
  1. For every property in a printout statement, the Array and Hash formats use "manysep" to delimit values.

Maybe something like it could be implemented for #subobject (and #set) declarations in addition to #ask queries? For some context concerning inline queries, see also bug 37899

{{#subobject: ...

property1=value 1; value 2; value 3
property2=value 1; value 2; value 3


(There might be valid arguments against using the name "manysep", but I hope you get the idea)

Version: unspecified
Severity: normal

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz39019.
Cavila created this task.Via LegacyAug 3 2012, 8:01 PM
Unknown Object (User) added a comment.Via ConduitNov 13 2012, 4:25 PM

Change [1] has been applied for SMW 1.9+ (This change is not valid for SMW 1.8).

Supported are:

|has test 1=Example 1;Example 2;Example 3;Example 4|+sep=;
|has test 2=Single examples
|has test 3=Example 1|Example 2|Example 3|Example 4

[1] https://gerrit.wikimedia.org/r/#/c/33193

Unknown Object (User) added a comment.Via ConduitNov 21 2012, 10:33 AM

Merged with 1.9 branch

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.