Transforming Container API


This section is normative.

In this document the following CURIE-Prefix shall be used for the following URIs:

Sections are non-normative unless otherwise specified. Unless otherwise specified subsections are normative if the containing section is normative.

The key words MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL in this specification are to be interpreted as described in RFC2119.


This document specifies an extension to the LDP specification to allow for container that execute a transformation task when a member resource is added via a POST request.


This section is normative.

Implementations of this specification MUST also conform to LDP.

If the representation contains a triple with the LDPC as subject and eldp:transformer as predicate an implementation MUST invoke the trans:Transformer identified by the object of this triple whenever a non-RDF member resource is create following a POST request to the LDPC. The request against the trans:Transformer SHOULD be executed asynchronously: the POST request SHOULD return according to section of LDP without waiting for the Transformer to complete. If the transformations is successful the results of the transformation SHOULD be added to the same collection. If the transformation result is an RDF graph a triple with predicate eldp:transformedFrom the transformation result resource as subject and the original non-RDF resource as object SHOULD be added to the transformation result LDPR.


This section in non-normative.

GET /container1 HTTP/1.1
Accept: text/turtle; charset=UTF-8
Prefer: return=representation; include=""


HTTP/1.1 200 OK
Content-Type: text/turtle; charset=UTF-8
ETag: "_87e52ce2917987"
Content-Length: 477
Link: <>; rel="type"
Preference-Applied: return=representation

@prefix dcterms: <>.
@prefix ldp: <>.
@prefix eldp: <>.

   a ldp:DirectContainer;
   dcterms:title "A transforming LDP Container using simple-transformer";
   ldp:membershipResource <>;
   ldp:hasMemberRelation ldp:member;
   ldp:insertedContentRelation ldp:MemberSubject;
   eldp:transformer <>.

The above container will process added resources using if their media-type matches one of the supported input formats of this transformer. If this is the case both the original resource as well as the Transformation results will be added to the container.