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

fix: id and state in Data Model #17

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/sections/conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ This document uses the following RDF vocabularies and corresponding namespace pr
<th> Namespace
<th> Description
<tbody>
<tr>
<td> <code>rdf
<td> <samp>https://www.w3.org/1999/02/22-rdf-syntax-ns#
<td> [[!RDF-SCHEMA]]
<tr>
<td> <code>xs
<td> <samp>http://www.w3.org/2001/XMLSchema#
<td> [[!XMLSCHEMA11-1]]
<tbody>
<tr>
<td> <code>as
<td> <samp>https://www.w3.org/ns/activitystreams#
Expand Down
12 changes: 6 additions & 6 deletions src/sections/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ A [PREP] notification from an LDP Resource on a [=Solid server=] MUST have the f

<dl>

<dt id="notification-property-id"><code>*id* &lt;xs:string></code>
<dd> an opaque identifier for the notification. Can be used to set `Last-Event-ID` in a subsequent [PREP] notifications request.
<dt id="notification-property-id"><code>*id* &lt;rdfs:subject></code>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is mention of rdfs:subject necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the closest thing I could find that indicates, that id is expected to be IRI. How else can I specify the type of id using RDF?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also https://www.w3.org/TR/xmlschema11-2/#anyURI

I don't have a strong opinion on only using IRI here. So, I'll dial back and suggest that a Note about what implementers may want to consider can be useful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy for you to suggest one. But in another PR so that it can be traced!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saying IRI should be enough; using rdf:subject seems confusing and possibly incorrect.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elf-pavlik The context above as @csarven points out is that, JSON-LD spec allows @id to be IRI or bnode. The latter, though not meaningful, is not expressly prohibited, and I don't want to add additional constraints without reason. I open to suggestion as to how to specify type for id.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in #18 :Notification IRI { requires it to be an IRI

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<dt id="notification-property-id"><code>*id* &lt;rdfs:subject></code>
<dt id="notification-property-id"><code>*id* IRI</code>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IRI itself is not a data type...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only literals have data type, not named or blanked nodes https://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal

<dd> a unique identifier for a notification.

<dt id="notification-property-type"><code>*type* &lt;as:Activity></code>
<dt id="notification-property-type"><code>*as:type* &lt;as:Activity></code>
<dd> the [[ACTIVITYSTREAMS-VOCABULARY#activity-types|type of activity]] that triggered the notification.

<dt id="notification-property-published"><code>*published* &lt;xs:dateTime></code>
<dt id="notification-property-published"><code>*as:published* &lt;xs:dateTime></code>
<dd> the date and time of the notification.

</dl>
Expand All @@ -23,8 +23,8 @@ A [PREP] notification from an LDP Resource on a [=Solid server=] SHOULD have the

<dl>

<dt id="notification-property-state"><code>*state* &lt;xs:string></code>
<dd> an opaque identifier for the last known state of the resource.
<dt id="notification-property-state"><code>*notify:state* &lt;xs:string></code>
<dd> an opaque identifier for the last known state of the resource. Can be used to set `Last-Event-ID` in a subsequent [PREP] notifications request.

</dl>

Expand Down
Loading