rows { options { physical_type: PHYSICAL_STREAM_TYPE_QUADS max_name_table_size: 128 max_prefix_table_size: 16 max_datatype_table_size: 16 logical_type: LOGICAL_STREAM_TYPE_DATASETS version: 2 } } rows { prefix { value: "https://w3id.org/np/" } } rows { name { value: "RAezfJXgkAmwRwSk52JWA-_mPkBf9JW1X08RdRWJlWvjU" } } rows { namespace { name: "this" value { prefix_id: 1 } } } rows { prefix { value: "https://w3id.org/np/RAezfJXgkAmwRwSk52JWA-_mPkBf9JW1X08RdRWJlWvjU/" } } rows { name { } } rows { namespace { name: "sub" value { prefix_id: 2 } } } rows { prefix { value: "http://schema.org/" } } rows { namespace { name: "schema" value { prefix_id: 3 name_id: 2 } } } rows { prefix { value: "https://w3id.org/kpxl/gen/terms/" } } rows { namespace { name: "gen" value { prefix_id: 4 name_id: 2 } } } rows { prefix { value: "http://www.nanopub.org/nschema#" } } rows { namespace { name: "np" value { prefix_id: 5 name_id: 2 } } } rows { prefix { value: "http://purl.org/dc/terms/" } } rows { namespace { name: "dct" value { prefix_id: 6 name_id: 2 } } } rows { prefix { value: "https://w3id.org/np/o/ntemplate/" } } rows { namespace { name: "nt" value { prefix_id: 7 name_id: 2 } } } rows { prefix { value: "http://purl.org/nanopub/x/" } } rows { namespace { name: "npx" value { prefix_id: 8 name_id: 2 } } } rows { prefix { value: "http://www.w3.org/2001/XMLSchema#" } } rows { namespace { name: "xsd" value { prefix_id: 9 name_id: 2 } } } rows { prefix { value: "http://www.w3.org/2000/01/rdf-schema#" } } rows { namespace { name: "rdfs" value { prefix_id: 10 name_id: 2 } } } rows { prefix { value: "http://www.w3.org/ns/prov#" } } rows { namespace { name: "prov" value { prefix_id: 11 name_id: 2 } } } rows { name { value: "hasAssertion" } } rows { name { value: "assertion" } } rows { name { value: "Head" } } rows { quad { s_iri { prefix_id: 1 name_id: 1 } p_iri { prefix_id: 5 name_id: 3 } o_iri { prefix_id: 2 } g_iri { } } } rows { name { value: "hasProvenance" } } rows { name { value: "provenance" } } rows { quad { p_iri { prefix_id: 5 } o_iri { prefix_id: 2 } } } rows { name { value: "hasPublicationInfo" } } rows { name { value: "pubinfo" } } rows { quad { p_iri { prefix_id: 5 } o_iri { prefix_id: 2 } } } rows { prefix { value: "http://www.w3.org/1999/02/22-rdf-syntax-ns#" } } rows { name { value: "type" } } rows { name { value: "Nanopublication" } } rows { quad { p_iri { prefix_id: 12 } o_iri { prefix_id: 5 } } } rows { prefix { value: "https://w3id.org/np/RAU-_8wiY6X--KpzE8lOFb0BxFyr7Kl07Nuzvq6wCfQTw/" } } rows { name { value: "paragraph" } } rows { name { value: "about" } } rows { prefix { value: "https://w3id.org/kpxl/grlc/" } } rows { name { value: "grlc-query" } } rows { quad { s_iri { prefix_id: 13 } p_iri { prefix_id: 3 } o_iri { prefix_id: 14 } g_iri { prefix_id: 2 name_id: 4 } } } rows { name { value: "title" } } rows { quad { p_iri { prefix_id: 3 name_id: 15 } o_literal { lex: "Multi-value placeholders" } } } rows { name { value: "Paragraph" } } rows { quad { p_iri { prefix_id: 12 name_id: 10 } o_iri { prefix_id: 4 name_id: 16 } } } rows { name { value: "hasContent" } } rows { quad { p_iri { } o_literal { lex: "
Nanopublication query templates extend grlc syntax by supporting placeholders that can have more than one value. Those have the suffix of \"_multi_iri\" (for IRIs) or just \"_multi\" (for literals). Importantly, they only work if there is at least one occurrence of a \"values\" statement like \"values ?_resource_multi_iri {}\", which indicates where the values are filled in. These multi-value placeholders take 1 or more IRIs/literals.
\nEvery subquery scope needs its own values block. A block in the outer query does not reach into a subquery, and the mistake is silent: the subquery simply matches nothing and the query returns no rows rather than an error.
Starting the name with two underscores instead of one makes a multi-value placeholder optional, as in ?__resource_multi_iri, which accepts zero or more values. With none given, the values block stays empty and the query still runs unconstrained. This is the only placeholder form that can both be tested in the query and be left unfilled.