Template:LabelStartsWith
This template generates is a partial query that filters items whose label in a language begins by some string. Can be used in conjunction with other partial queries and/or in any sparql query.
Variable naming
editVariable naming is the same as {{Labelled}}
, so something like ?itemLabelIt
in the example below.
Usage
edit{{LabelStartsWith|item|Paris|it}}
?item rdfs:label ?itemLabelIt filter (lang(?itemLabelIt) = "it"&& strstarts(?item, "Paris"))
In context :
select ?item where { {{tl|LabelStartsWith|item|Paris|it}} }
will give
select ?item where {
?item rdfs:label ?itemLabelIt filter (lang(?itemLabelIt) = "it"&& strstarts(?item, "Paris")) }
See also
editPartial query to filter items with a label that starts with a certain string in a language.
Parameter | Description | Type | Status | |
---|---|---|---|---|
item | 1 item | item variable name or item id
| String | required |
2 | 2 string | beginnig string of the label to search
| String | required |
lang | 3 | language code of the label
| String | required |
The above documentation is transcluded from Template:LabelStartsWith/doc (edit | history). Editors can experiment in this template's sandbox (create | mirror) and testcases (create) page. Please add categories to the /doc subpage. Subpages of this template. |
?{{{1}}} rdfs:label ?{{{1}}}Label{{{3}}} filter (lang(?{{{1}}}Label{{{3}}}) = "{{{3}}}"&& strstarts(?{{{1}}}, "{{{2}}}"))