SWI-Prolog / packages-semweb

The SWI-Prolog RDF store
28 stars 14 forks source link

Unclear documentation of rdf_current_prefix/2 #81

Open wouterbeek opened 6 years ago

wouterbeek commented 6 years ago

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.