Working with the #set "separator" parameter

From semantic-mediawiki.org
Jump to: navigation, search
[[Has name::"separator" parameter to #set]]
{{#set:|Has description=This page describes the "seperator" parameter to the "#set" parser function.|template=LinkToValue}}
Keywords
{{#set:Has keyword=#set; setting values; separator parameter; example; template format; documentation |+sep=;|template=LinkToAskQueryForParameter}}
Table of Contents

Semantic MediaWiki 1.9.0 introduced the |+sep=... parameter to the #set parser function. This parameter allows to declare a separator CiteRef::smw:gerrit:32347CiteRef::smw:phab:T38309 for splitting value declarations assigned to a property.

Syntax

{{#set:
 |property1=value1;value2|+sep=;
 |property2=value1,value2,value3|+sep=,
 ...
}}

Example

{{#set:
 |Has text=fc00:123:8000::/%6;2001:db8::1428:57ab;2001:db8:0:8d3:0:8a2e:70:7344
 |+sep=;
}}

{{#set:

|Has text=fc00:123:8000::/%6;2001:db8::1428:57ab;2001:db8:0:8d3:0:8a2e:70:7344
|+sep=;

}} NoteNote:  In this case only a silent annotation using #set is possible since the values e.g. "2001:db8::1428" which should be assigned to the property contain two consecutive colons "::" which cannot be use for in-text annotations. Other restricted characters or values that can only be annotated this way are square brackets or wiki-links.

Result

For verification, see the property assignments to the "Has text" property on special page Special:Browse for this page.

More examples

See also this page for more examples using different separators.

{{#scite:smw:gerrit:32347

|type=issue
|citation text=Semantic MediaWiki: Gerrit commit 32347

}} {{#scite:smw:phab:T38309

|type=issue
|citation text=Semantic Mediawiki: Phabricator task T38309 (Bugzilla bug 36309)

}}