Callimachus Named Queries use a superset of the SPARQL 1.1 query syntax SELECT form.

As in SPARQL, any prefixes used in the Named Query must be declared using a PREFIX clause. When evaluating, the base IRI of the query is the URI of the Named Query.

Sample named query

PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
SELECT ?nameX ?nameY ?nickY
WHERE
  { ?x foaf:knows ?y ;
       foaf:name ?nameX .
    ?y foaf:name ?nameY .
    OPTIONAL { ?y foaf:nick ?nickY }
  }
OFFSET ${ ($pageNumber - 1) * $pageSize } LIMIT ${ $pageSize }