Previous topic  Top  Next topic  Print this Topic

Declaring Namespaces


An ObjectLogic file can contain namespace declarations that associate namespace URIs with aliases, that can be used to formulate namespace terms in a more concise way.

:- prefix cars="".

:- prefix finance="".

:- prefix xsd="".

:- default prefix ="".

The code above declares four namespaces. It associates three of them with shortcuts (or aliases) and the last is declared as the default-namespace. Each namespace must represent a valid URI according to RFC 2396 and must end with either "#", "/" or ":". This is essential since these characters mark the separator between the namespace and the local part of an identifier. This convention is particularly important when exporting to RDF/OWL or reading from these formats.