Help:Using a space to separate multiple values in set/subobject

From semantic-mediawiki.org
Using a space to separate multiple values in setHelp:Using a space to separate multiple values in set/subobject
Semantic extension(s): Semantic MediaWiki
Further extension(s):  -/-
Keyword(s): separator · delimiter · #set · #subobject · #arraymap

Description:

How to separate multiple values in #set/#subobject using a space as delimiter

The problem[edit]

Some property values are best delimited using a space (or a new line). To separate URLs you can write something like

{{#arraymap:https://www.semantic-mediawiki.org https://www.mediawiki.org http://sandbox.semantic-mediawiki.org/wiki/| |@@|[[URLtypeproperty::@@|link]]}}

(The #arraymap parser comes with Page Forms (formerly Semantic Forms))

So far so good, but how does it work for #set and #subobject notations? The following will not work since the space is interpreted as %20.

{{#subobject:
|URLtypeproperty=https://www.semantic-mediawiki.org https://www.mediawiki.org http://sandbox.semantic-mediawiki.org/wiki/|+sep=< nowiki> </nowiki>
}}

The solution[edit]

The solution is to use a combination of both:

{{#subobject:
|URLtypeproperty={{#arraymap:https://www.semantic-mediawiki.org https://www.mediawiki.org http://sandbox.semantic-mediawiki.org/wiki/| |@@|@@|SOMETHINGYOUWOULDNOTEXPECTTOSEEINAURL}}|+sep=SOMETHINGYOUWOULDNOTEXPECTTOSEEINAURL
}}

Source[edit]