[data-shapes] Time stamp compatibility (#309)

ajnelson-nist has just created a new issue for https://github.com/w3c/data-shapes:

== Time stamp compatibility ==
I have some use cases involving multiple properties that can represent the "Same" timestamp, but happen to have specifications that slightly disagree on the datatype to use, especially `xsd:dateTime` vs. `xsd:dateTimeStamp`.  Sometimes, these properties are in different specifications - that matter is a bit moot, though, because I can't change the specification(s).

Because RDF doesn't have "Subdatatype" like it has "Subclass" and "Subproperty," this is a compatibility issue if I ever want to try to port the "Same" timestamp from one of the properties to another.

E.g., take this graph:

```turtle
PREFIX ex: <http://example.org/>

ex:p-dt
  a rdf:Property ;
  rdfs:range xsd:dateTime ;
  .

ex:p-dts
  a rdf:Property ;
  rdfs:range xsd:dateTimeStamp ;
  .

ex:Thing-1
  ex:p-dts "2020-01-02T03:04:05-06:00"^^xsd:dateTimeStamp ;
  .
```

If I want to derive this triple ...

```turtle
ex:Thing-1
  ex:p-dt "2020-01-02T03:04:05-06:00"^^xsd:dateTime ;
  .
```

... my understanding is I currently have to step into SPARQL to use [`STRDT`](https://www.w3.org/TR/sparql11-query/#func-strdt) in a `CONSTRUCT` query.

And, there is an extra check needed to go from `xsd:dateTime` to `xsd:dateTimeStamp`, to confirm that the timestamp has a time zone.  I'd prefer to not construct the triple, rather than construct a triple with an errant literal.

This seems like something that should be doable with a node expression, with a touch of `sh:pattern`.  Is there design in place, or planned, on re-typing literals?

Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/309 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 5 March 2025 15:23:26 UTC