packages-semweb
packages-semweb copied to clipboard
Unclear documentation of rdf_current_prefix/2
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.