Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve/clarify documentation of rdf_global_id/2 #50

Open
wouterbeek opened this issue Jan 20, 2017 · 0 comments
Open

Improve/clarify documentation of rdf_global_id/2 #50

wouterbeek opened this issue Jan 20, 2017 · 0 comments

Comments

@wouterbeek
Copy link
Contributor

wouterbeek commented Jan 20, 2017

The following documentation seems outdated:

rdf_global_id(?Id, :GlobalId) is det.

Convert between NS:Local and global atomic identifier. To be completed.
Note that the predicate is a meta-predicate on the output argument. This
is necessary to get the module context while the first argument may be of
the form (:)/2.

The use of : seems to be no longer used in module rdf11. At the same time, : implies +, but rdf_global_id/2 can certainly be used with uninstantiated second argument (that is its most common use). I also suggest to rename NS to Alias and GlobalId to Iri.

In addition, [1] throws a type error, but [2] fails silently. IMO the predicate should always throw a type error in case the second argument is nonvar and not an atom.

[1]   rdf_global_id(rdf:a, 1^^xsd:int).
[2]   rdf_global_id(rdf:Y, 1^^xsd:int).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant