Uri short form

Dear SWI prolog community

experimenting with the RDF importing libraries and with the pretty-print library I noted that the URI short form is not handled uniformly. An example after having imported material from an RDFS repository:

:-rdf(S, P, O).
O = rdfs:‘Resource’ ;
S = rdfs:subPropertyOf,
P = rdfs:domain,
O = rdf:‘Property’ ;
S = rdfs:subClassOf,
P = rdfs:domain,
O = rdfs:‘Class’ ;
S = P, P = rdfs:domain,
O = rdf:‘Property’ ;
S = rdfs:range,
P = rdfs:domain,
O = rdf:‘Property’ ;
S = rdfs:member,
P = rdfs:domain,
O = rdfs:‘Resource’ ;
S = rdf:subject,
P = rdfs:domain,
O = rdf:‘Statement’ ;
S = rdf:predicate,
P = rdfs:domain,
O = rdf:‘Statement’ ;
S = rdf:object,
P = rdfs:domain,
O = rdf:‘Statement’ ;
S = rdf:first,
P = rdfs:domain,
O = rdf:‘List’ ;
S = rdf:rest,
P = rdfs:domain,
O = rdf:‘List’ ;
S = rdf:value,
P = rdfs:domain,
O = rdfs:‘Resource’ ;
S = rdfs:seeAlso,
P = rdfs:domain,
O = rdfs:‘Resource’

As you will have recognised these are a part of the RDFS axiomatic statements.
What I do have to notice is that especially on the Object “O” output the qname is bound to a term ‘rdfs’ and the token is sometimes bound to another term like

O = rdfs:seeAlso

but also to a less nice printed term like

O = rdf:‘Statement’ ;

Furthermore in case there is a use for the famous (very readable) default namespace declared in RDF e.g. by:

prefix : <http://food.eat/example/ >

The output of an URI containing that namespace - e.g. http://food.eat/example/Person results in

‘’:Person
or even in
‘’:‘Person’

(here I “know” that prolog technically “needs” a term but the qname is here practically missing and that this is indeed a difficult case to solve elegantly…)

Forgive me my dumb questions here now:

  1. is this a wanted “pretty print” ?
  2. can the actually useless quotes be eliminated (how) - eg. rdf:Statement instead of rdf:‘Statement’?
  3. did I forget something like declaring e.g. a namespace declaration for rdf (do not think, since e.g. rdf:type is correctly printed/bound) ?
  4. how can I repair this (if this is/was a kind-of “forgotten” thing) ?

In my opinion every URI short form should be pretty printed in the same manner.
Thank you for any hint

Regards
Fabio

Well, I doubt about e.g., '':'Person'. Possibly we should block the default prefix to be used.

They are not useless. The idea of the toplevel is that you can copy/paste results. You cannot copy/paste rdf:Statement as Statement is a variable.

I don’t really get to what (3) and (4) refer.

True (sorry, my fault) - things like “:Person” with a block capital start would be Prolog variables, hence the system encloses them in quotes. So everything is OK then.