packages-semweb icon indicating copy to clipboard operation
packages-semweb copied to clipboard

Unclear documentation of rdf_current_prefix/2

Open wouterbeek opened this issue 7 years ago • 0 comments

rdf_current_prefix(:Alias, ?URI) is currently documented as follows:

If Alias is unbound and one URI is the prefix of another, the longest is returned first. This allows turning a resource into a prefix/local couple using the simple enumeration below.

rdf_current_prefix(Prefix, Expansion),
atom_concat(Expansion, Local, URI),

What does this mean? If Alias is unbound and URI is unbound, then the declared Alias-URI pairs are enumerated, regardless of the lengths of URI. If Alias is unbound and URI is bound, there is at most one solution for Alias, so there is no use for returning the longest solution first.

wouterbeek avatar Jul 06 '18 19:07 wouterbeek