W3C home > Mailing lists > Public > public-hydra@w3.org > July 2014

RE: Call for consensus on defining IRI template expansion (ISSUE-30)

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Mon, 21 Jul 2014 20:49:55 +0200
To: <public-hydra@w3.org>
Message-ID: <01ad01cfa514$9a377b50$cea671f0$@gmx.net>
On 16 Jul 2014 at 19:40, Gregg Kellogg wrote:
> On Jul 16, 2014, at 10:26 AM, Markus Lanthaler wrote: 
>> Currently, the expansion of IRI templates is underspecified in the sense
>> that it is not defined how a value (IRI, string, number, etc.) should be
>> included in the expanded IRI. Thus the proposal is to only use the
lexical
>> representation of the value or the IRI (no quoting) by default.
>> Additionally, we will add a flag, i.e., a property whose value is a
boolean,
>> hydra:expandedRepresentation to IriTemplateMapping, that, if set to true,
>> changes the expansion to work as follows:
>> 
>>  - The lexical representation is enclosed in quotes with no escaping of
>>    the value itself
>>  - the datatype xsd:string is always omitted
>>  - language tags are appended to the lexical representation by using an
>>    @ symbol - datatypes are added using ^ (just one) and then the URL
>>    without enclosing it in <>
>>  - URLs are kept as they are
>>
>> Thus, the following values in Turtle notation expand to the following
>> strings when used in a IRI template
>> 
>>  - """Value with a " inside"""  --> "Value with a " inside"
>>    (without the """ the inner quote would have to be escaped in Turtle)
>>  - "English"@en --> "English"@en
>>  - "24"^^<xsd:integer> --> "24"^http://www.w3.org/2001/XMLSchema#integer
>>  - http://example.com/ --> http://example.com/
> 
> I'd like to see more general motivation for this feature, including some
more
> explicit examples of using IRI templates.

In most of my applications I won't need the hydra:expandedRepresentation but
there are applications such as Linked Data Fragments which do care about
these details. It might also be important in multilingual applications where
the same word might mean different things in different languages (the
language tag helps to understand what the user meant) or if types are used
for things like units (degree Celsius vs. Fahrenheit).


> Why break from Turtle/N-Triples on ^ vs ^^? Otherwise, this looks like an
N-Triples
> format, where IRIs are "bare", and literals are always quoted.

Because it isn't Turtle. We do not escape literals and do not put IRIs in
angle brackets. I would even be ok if we would change this to a completely
different character (same for @) to make this even clearer. I would like to
keep the rules as simple as possible to make encoding/decoding as trivial
and "canonical" as possible.


> Also, this proposal doesn't seem to consider the general discussion on the
> issue.

Do you have something specific in mind that hasn't been considered?


--
Markus Lanthaler
@markuslanthaler
Received on Monday, 21 July 2014 18:50:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:29:42 UTC