Hello. I would like to propose some new syntactic options for accessing and utilizing the query string portions of URIs in N3 and, perhaps, other Semantic Web languages.
The first proposed syntax resembles: prefix:localname??(... list ...).
The following two examples showcase the proposed syntax:
This syntax ex:Widget??(ex:Foo ex:Foo2 ex:Foo3) maps to a URI: http://example.org/?T[]=http%3A%2F%2Fexample.org%2F%23Foo&T[]=http%3A%2F%2Fexample.org%2F%23Foo2&T[]=http%3A%2F%2Fexample.org%2F%23Foo3#Widget.
This syntax ex:Widget??(("p1" ex:Foo) ("p2" ex:Foo2) ("p3" ex:Foo3)) maps to a URI: http://example.org?p1=http%3A%2F%2Fexample.org%2F%23Foo&p2=http%3A%2F%2Fexample.org%2F%23Foo2&p3=http%3A%2F%2Fexample.org%2F%23Foo3#Widget.
The default parameter array name, e.g., T[] or _[], would be a matter for discussion.
The second proposed syntax resembles: $"literal" and $<uri>.
The $ symbol could be utilized, including in contexts with variables, to indicate that arguments are to be processed into RDF literal strings. For example:
ex:alice ex:says $"Hello {?x}" .
A similar notation could be utilized for URI nodes:
Hello. I would like to propose some new syntactic options for accessing and utilizing the query string portions of URIs in N3 and, perhaps, other Semantic Web languages.
The first proposed syntax resembles:
prefix:localname??(... list ...)
.The following two examples showcase the proposed syntax:
This syntax
ex:Widget??(ex:Foo ex:Foo2 ex:Foo3)
maps to a URI:http://example.org/?T[]=http%3A%2F%2Fexample.org%2F%23Foo&T[]=http%3A%2F%2Fexample.org%2F%23Foo2&T[]=http%3A%2F%2Fexample.org%2F%23Foo3#Widget
.This syntax
ex:Widget??(("p1" ex:Foo) ("p2" ex:Foo2) ("p3" ex:Foo3))
maps to a URI:http://example.org?p1=http%3A%2F%2Fexample.org%2F%23Foo&p2=http%3A%2F%2Fexample.org%2F%23Foo2&p3=http%3A%2F%2Fexample.org%2F%23Foo3#Widget
.The default parameter array name, e.g.,
T[]
or_[]
, would be a matter for discussion.The second proposed syntax resembles:
$"literal"
and$<uri>
.The
$
symbol could be utilized, including in contexts with variables, to indicate that arguments are to be processed into RDF literal strings. For example:A similar notation could be utilized for URI nodes:
In my opinion, either proposed syntax would be generally useful. Any thoughts on these syntactic options for N3? Thank you.
See also: https://github.com/w3c-cg/planning/discussions/27#discussion-4656864