I'm wondering if there are existing vocabularies and best practices that deal with the following use case:
How do I write down metadata about the return type of a SPARQL function that returns a URI?
Since "returns a URI" can be a bit ambiguous in the face of things like xsd:anyURI typed literals, we can be a bit more precise:
How do I write down metadata about the return type of a SPARQL function that returns a term for which the isURI function returns true?
Functions like this have all sorts of uses. We use them all the time in conjunction with CONSTRUCT queries and the SPARQL 1.1 BIND clause to generate URIs for new resources.
So, when describing this function, how do I write down the return type of one of these URI-generating functions? I want to write something like:
fn:GenerateURI fn:returns ??
If I had a function that returned an integer, I'd expect to be able to write something like:
fn:Floor fn:returns xsd:integer
But in that case, I'm taking advantage of the fact that datatyped literals denote themselves. (Thanks to Andy Seaborne for pointing this out to me.) I can't say this:
fn:GenerateURI fn:returns xsd:anyURI
This seems to tell me that my function returns something that denotes a URI. (One such things that denotes a URI is an xsd:anyURI literal.) But, again, that's not what I want to say here. I want to say that my function returns something that is syntactically a URI. That is, it returns something that is named by a URI. I considerd something like:
fn:GenerateURI fn:returns rdfs:Resource
But rdfs:Resource is a class of everything, and as far as I can tell would mean that my function could return a URI, a literal, or a blank node.
So any suggestions for how to approach this sort of modeling of the return type (and parameter types) for SPARQL functions?