mulgara - semantic store

skip navigation

SHOW SITE NAV
fixed
fluid
straight

alias

Creates an alias to a resource. This simplifies queries by using qualified names instead of element references within constraints.

The general syntax is as follows:

alias resource as namespace;

Where resource is the URI prefix to abbreviate and namespace is an unquoted XML namespace prefix.

For example:

alias <http://purl.org/dc/elements/1.1/> as dcns;
alias <http://www.w3.org/1999/02/22-rdf-syntax-ns#> as rdfns;

Note - Alias substitution only occurs in the where clause of select commands.

For example, the where clause in the following select command uses a complete URI.

select $obj $pred from <http://purl.org/dc/elements/1.1/>
where <http://purl.org/dc/elements/1.1/title> $pred $obj;

With the alias command, this can be simplified to:

alias <http://purl.org/dc/elements/1.1/> as dc;
select $obj $pred from <http://purl.org/dc/elements/1.1/> where <dc:title> $pred $obj;

Valid XHTML 1.0 TransitionalValid CSS 3.0!