OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

oslc-core message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Resource Preview issues


Resource Preview 2.0 compatibility raises a few issues, hopefully a small enough number to be able to address in a single email.

1. Preview Discovery

OSLC2 does Preview Discovery via GET on a resource that supports Preview using an Accept: application/x-oslc-compact+xml header to request the Compact resource representation of the resource.

OSLC3 uses HEAD or OPTIONS on the resource and gets the URI for the Preview from a Link header. This takes two HTTP requests. Clients can get the Compact resource in one step by using the Prefer: return=representation; include="http://open-services.net/ns/core#PreferCompact" header on the GET to get the Compact resource in a single request.

Discussion: The OSLC2 application/x-oslc-compact+xml header would be a third way to get the Compact resource. Should all three be supported, or is the OSLC2 approach actually the simplest and most HTTP consistent?

Resolution: I think OSLC2 got this right and OSLC3 preview discovery is unnecessarily complex. Accept headers are used to negotiate resource representations, and a Compact resource is an indirect representation of a resource for display purposes. So I recommend continuing to use the Accept: application/x-oslc-compact+xml to get the Compact resource, and eliminate the OSLC3 Link and Prefer headers.


2. Compact Resource Representation

Compact resource is an XML document in OSLC2, although it may be RDF/XML it should be processed as XML. This format will also need to be supported and return when the media-type requested through the Accept header is  application/x-oslc-compact+xml.

OSLC3 Compact resource representation MUST be application/json and text/turtle, SHOULD be application/ld+json.

Resolution: add OSLC3 Compact resource MUST support media-type application/x-oslc-compact+xml in addition to the JSON and RDF representations. Clients use Accept header to get the representation they want.


3. Preview Resize message

OSLC2 resize message is "oslc-preview-height: <newHeight>"

OSLC3 resize message is oslc-resize: {"oslc:hintHeight": <newHeight>, "oslc:hintWidth": <newWidth>}
 
Resolution: OSLC3 supports 2 resize messages, one for just height that would work with 2.0 clients, and one that includes height and width in the oslc-resize message. OSLC 3.0 clients would look for both. OSLC3 servers should send just the height message or both if there is a reason to send height and width information.




Jim Amsden, Senior Technical Staff Member
OSLC and Linked Lifecycle Data
919-525-6575



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]