Skip to content

(ShEx → SPARQL) Conver a simple ShEx schema to SPARQL

Jose Emilio Labra Gayo edited this page Aug 12, 2024 · 5 revisions

(ShEx → SPARQL) Convert a simple ShEx schema to SPARQL

It is possible to convert simple ShEx schemas to SPARQL queries. This option can be useful when data portals contain descriptions in ShEx and one needs to create SPARQL queries from those ShEx descriptions.

Example:

$ rudox convert -d examples/user.shex -m shex -x sparql
prefix : <http://example.org/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix schema: <http://schema.org/>

SELECT * WHERE {
 ?this schema:name ?name .
 ?this schema:knows ?knows .
 ?this :status ?status .
}
Clone this wiki locally