Last modified: 2012-11-21 10:33:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41019, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39019 - [SMW] Separator for multiple values per property in subobjects
[SMW] Separator for multiple values per property in subobjects
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 41842
  Show dependency treegraph
 
Reported: 2012-08-03 20:01 UTC by contrafibularity
Modified: 2012-11-21 10:33 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description contrafibularity 2012-08-03 20:01:15 UTC
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: ...
|property1=value1
|property1=value2
|property1=value3
}}

and more recently,

{{#subobject: ...
|property1=value1|value2|value3
}}

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; 
|property2=value1
}}

   In template
   {{#subobject: ...
   |property1#list={{{property1values|}}}
   |property2={{{property2value|}}}
   }}

2. 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
|manysep=;
}}

(There might be valid arguments against using the name "manysep", but I hope you get the idea)
Comment 1 MWJames 2012-11-13 16:25:43 UTC
Change [1] has been applied for SMW 1.9+ (This change is not valid for SMW 1.8).

Supported are:

{{#subobject:
 |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
Comment 2 MWJames 2012-11-21 10:33:04 UTC
Merged with 1.9 branch

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links