Prefixes/namespaces: preferred way to define?

Skip to first unread message

Richard Walker

Aug 14, 2017, 11:59:33 PM8/14/17
to linked-data-api-discuss
It seems that to add a prefix/namespace to results, I can either:

(a) use the api:prefixMapping predicate, e.g.:

my:vocab a api:API ;
  # etc. etc.
  api:prefixMapping [ api:prefix "time" ; api:namespace "" ]

(b) define the prefix at the top level, like any other prefix:

@prefix time: <> .

The com.epimorphics.lda.specs.ExtractPrefixMapping class picks up both types of definition.

Is there a view as to which is "better"?

chris dollin

Aug 22, 2017, 8:49:44 AM8/22/17
to linked-data-api-discuss
Neither is automatically better than the other.

The @prefixes are automatically global, ie shared by
all the specs within a given config. And they're availble
within the spec itself.

The api:prefixMapping declarations apply only to
the spec they're attached to.


On 15 August 2017 at 04:59, Richard Walker
> --
> You received this message because you are subscribed to the Google Groups
> "linked-data-api-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
> For more options, visit

Chris "allusive" Dollin

Richard Walker

Aug 22, 2017, 7:14:24 PM8/22/17
to linked-data-api-discuss
On Tuesday, August 22, 2017 at 10:49:44 PM UTC+10, chris wrote:

Three excellent points.

Reply all
Reply to author
0 new messages