W3C home > Mailing lists > Public > public-data-shapes-wg@w3.org > March 2015

Re: xsd:anyURI syntax

From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
Date: Wed, 04 Mar 2015 07:55:59 -0800
Message-ID: <54F72B0F.1090107@gmail.com>
To: Holger Knublauch <holger@topquadrant.com>, public-data-shapes-wg@w3.org
Hash: SHA1

Well as far as preferred syntax goes, I expect that something like
ex:Issue <=
{   ex:state (ex:unassigned ex:assigned),
    ex:reportedBy @<UserShape>,
    ex:reportedOn xsd:dateTime,
    ex:related @<IssueShape>*
is better than any RDF encoding of the syntax.

You do have a point, however.  Just what benefit is gained from using
literals uniformly in an RDF encoding of constraints?

What is going on is that bits of the RDF encoding are being combined to
produce some SPARQL syntax, which is in the end a string.  Combining things
together to produce strings works best if the things being combined are strings.

Why then use xsd:anyURI instead of using xsd:string uniformly?  (After all,
if xsd:string was being used uniformly then the Turtle syntax could look
nicer, and CURIES could be used (except that prefixes would be interpreted
in the SPARQL query).)  Some of the bits of SPARQL syntax that are being
combined are IRIs so making these bits be literals that are IRIs allows the
RDF literal machinery to help enforce valid input.

The confounding factor here is that the RDF syntax has bits that are IRIs,
and appear to be eminently suitable for this part of the RDF encoding of
SPARQL syntax.  This does work out, except that it conflates mentions of
strings/IRIs (the literals) with use of IRIs (the RDF nodes).  Will anything
bad come from this conflation?  I can't think of any, but I do worry that
there will be some situation in the future where the RDF node somehow
mentions an IRI that should have been used but the node's IRI gets used instead.

Consider OWL Full, for example.  In OWL Full you can say things like
  ex:myIRI owl:sameAs "http://example.com/yourIRI"^^xsd:anyURI .
What then should the result be for
  [ shacl:property ex:state;
    shacl:value ex:myIRI ]

In the end, though, I would not object to using RDF nodes here, although I
would feel even more unclean.


On 03/03/2015 08:34 PM, Holger Knublauch wrote:
> Spawning off a thread on the choice of using xsd:anyURI. I anticipate it
> is pretty obvious which syntax most users would prefer:
> shacl:classScope"http://example.org/Person"^^xsd:anyURI ;
> or
> shacl:classScope ex:Person ;
> so maybe you should clarify why you made that suggestion. You quoted 
> "representational purity" and "to separate use and mention" but as a WG
> member I would not want to receive death threats from users who are no
> longer allowed to write qnames in their Turtle and JSON-LD files :)
> So what practical problems do you anticipate if they would be proper IRI
> nodes?
> Thanks, Holger
> On 3/4/2015 13:32, Peter F. Patel-Schneider wrote: I have attached a
> couple of examples.  (They get too messed up if I put them in line.)
> peter
Version: GnuPG v1

Received on Wednesday, 4 March 2015 15:56:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:30:17 UTC