[{TableOfContents }]
!!! Definition
The ExpectedSparqlResult markup allows to define an expected result set for some sparql query. Then the CI-Test ''SparqlResultTable'' (see [Doc CIDashboard]) can be used to test a query against an expected result set.
{{{
%% ExpectedSparqlResult...
}}}
After the SPARQL statement the following annotations can be inserted:
|| Annotation || Description
| @name | Assignes a name to this ExpectedSparqlResult markup expression. The name can/should be used as reference for the test object in the definition of the corresponding SparqlResultTable test in the CI-Dashboard .
| @sparql | The name of the sparql query that should be testet against this result set.
| @border | A visual border is painted around the result table cells.
| @rawOutput | No abbreviations are used in the result table, but the full content (of literals for example) is printed.
| @showQuery | Besides the results of the query, also the query is shown in the view mode of the wiki.
| @sorting | The result table is sorted.
!!! Example
The sparql markup allows full support of the SPARQL 1.1. query language specification, which can be found here: [http://www.w3.org/TR/sparql11-query/]
The following simple example shows a query selecting all instances of the class Person:
{{{
%%sparql
SELECT ?x
WHERE {
?x rdf:type lns:Person .
}
@name: exampleQuery
@zebramode: true
@border: true
%
}}}
In the view mode the results of the query are shown.
!!! See also
* [InlineSparql|Doc InlineSparql]