rselect is a Scheme macro that retrieves data from an RDF depository. It is assumed that every "item" (resource or literal) has a unique integer ID number.

(rselect (rv...) ((subject predicate object)...))

The first argument is a list of zero or more return values.

The second argument is a list of zero or more statements. A statement is a list of three items, representing subject, predicate and object respectively. An item is one of:

rselect returns a list of match lists, one for each set of variables that satisfy the statements. A match list is a list of values specified by the return value list. A return value is one of:

Try it out.


This is the pure functional variant of HScheme, no set! etc.

All Literals

All literals, together with their IDs

All URIs

All URIs, together with their IDs

IDs and URIs

Conversion between ID and URI. Note how rselect returns an ID (integer) even when a URI (string) is specified as a return value. rselect always returns IDs unless one of the special forms (above) is used.


The URIs and labels of all classes. The symbols rdf and rdfs are predefined as functions that prefix the appropriate namespace strings.


The domains and ranges of properties in "property: domain -> range" form.

Class Hierarchy

The class hierarchy in (label (subclass...)) form.

SoupServer | Interpret Scheme | rselect | Show Template