nodeSolidServer / nodeSolidServer/node-solid-server

PATCH does not work on turtle

Open
#1,696 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.8k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

Hi all,
I was unsuccessfully trying to HTTP PATCH a turtle file. If I don't prefix the 'xsd' namespace the patch works.

Original resource:

@prefix : <#>.
@prefix as: <https://www.w3.org/ns/activitystreams#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix p: <./>.
@prefix notes: <../>.

p:546851bd-1db4-4b8d-bea2-1a33e982c73b
    a as:OrderedCollectionPage;
    as:partOf notes:mynotes;
    as:startIndex "0"^^<xsd:nonNegativeInteger>.

PATCH:

DELETE DATA { <https://diegoalbuquerque.localhost:8443/tests/collections/notes/pages/546851bd-1db4-4b8d-bea2-1a33e982c73b> <https://www.w3.org/ns/activitystreams#startIndex> "0"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger>. }

RESULT:

The patch could not be applied. Could not find to delete: <https://diegoalbuquerque.localhost:8443/tests/collections/notes/pages/546851bd-1db4-4b8d-bea2-1a33e982c73b> <https://www.w3.org/ns/activitystreams#startIndex> "0"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger> .

This works:

@prefix : <#>.
@prefix as: <https://www.w3.org/ns/activitystreams#>.
@prefix p: <./>.
@prefix notes: <../>.

p:546851bd-1db4-4b8d-bea2-1a33e982c73b
    a as:OrderedCollectionPage;
    as:partOf notes:mynotes;
    as:startIndex "0"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger>.

Am I doing something wrong?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the supplied PATCH against the original Turtle resource, comparing the prefixed xsd:nonNegativeInteger form with the full datatype IRI. Trace the PATCH handling and Turtle/RDF parsing path; done means the DELETE DATA request succeeds when the resource uses the xsd prefix, with a regression test covering both forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.