- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Mon, 20 Oct 2014 20:28:23 +0200
- To: <public-hydra@w3.org>
It seems that in the last couple of weeks we have reached consensus on a new IriTemplate design that will resolve its current shortcomings. Briefly summarized, the main issue of the current design is that the expansion of IRI templates is currently underspecified in the sense that it is not defined how a value (IRI, string, number, etc.) should be included in the expanded IRI. This has been tracked as ISSUE-30 [1] and ISSUE-17 [2]. The proposed solution for these issues introduces a new property hydra:variableRepresentation that can be used on a hydra:IriTemplate to define how a client replaces variables in the IRI template with values. For the time being, Hydra will support two representations: hydra:BasicRepresentation and hydra:ExplicitRepresentation. The former, hydra:BasicRepresentation, serializes just the lexical form, but omits language and type information. hydra:ExplicitRepresentation on the other hand includes language and type information. The difference between the two variable representation formats is illustrated by the following examples. === hydra:BasicRepresentation === <http://example.com> { "@id": "http://example.com" } ----> http://example.com "A simple string" { "@value": "A simple string" } ----> A simple string """Also this " works""" { "@value": "Also this \" works" } ----> Also this " works "A language-tagged string"@en { "@value": "A language-tagged string", "@language": "en" } ----> A language-tagged string "5.5"^^xsd:xsd:decimal { "@value": "5.5", "@language": "xsd:decimal" } ----> 5.5 === hydra:BasicRepresentation === <http://example.com> { "@id": "http://example.com" } ----> http://example.com "A simple string" { "@value": "A simple string" } ----> "A simple string" or -> "A simple string"^^http://www.w3.org/2001/XMLSchema#string """Also this " works""" { "@value": "Also this \" works" } ----> "Also this " works" or -> "Also this " works"^^http://www.w3.org/2001/XMLSchema#string "A language-tagged string"@en { "@value": "A language-tagged string", "@language": "en" } ----> "A language-tagged string"@en "5.5"^^xsd:xsd:decimal { "@value": "5.5", "@language": "xsd:decimal" } ----> "5.5"^^http://www.w3.org/2001/XMLSchema#decimal Additionally, in order to resolve ISSUE-17 [2], a new datatype hydra:rfc6570Template will be introduced. This datatype can be used to explicitly specify the syntax of the hydra:template. For the time being, RFC6570 [3] is the only supported IRI template syntax. The range of hydra:template won't be changed to hydra:rfc6570Template but the Hydra JSON-LD context will be updated to type-coerce the property "template" automatically. If a client encounters a template with a datatype of xsd:string, it should be interpreted as RFC6570 template. This serves as a call for consensus. Before I proceed with marking the issues [1-2] as resolved and implementing the changes in the spec, I would like to ask if anyone has any concerns or objections against this proposal. Please submit your comments by Friday, October 24th (+1s are welcome as well). Thanks, Markus [1] https://github.com/HydraCG/Specifications/issues/30 [2] https://github.com/HydraCG/Specifications/issues/17 [3] https://tools.ietf.org/html/rfc6570 -- Markus Lanthaler @markuslanthaler
Received on Monday, 20 October 2014 18:28:50 UTC