RE: Moving forward with ISSUE-30 (IRI template expansion)

> -----Original Message-----
> From: Markus Lanthaler [mailto:markus.lanthaler@gmx.net]
> Sent: Friday, August 15, 2014 5:07 PM
> To: public-hydra@w3.org
> Subject: RE: Moving forward with ISSUE-30 (IRI template expansion)
> 
> On 14 Aug 2014 at 23:28, McBennett, Pat wrote:
> > Markus Lanthaler wrote on 12 Aug 2014 at 15:52:
> >> The thing we are discussing here would look as follows:
> >>
> >>    [
> >>      a IriTemplate ;
> >>      template "http://example.com/users/{id}" ;
> >>      variableRepresentation hydra:ExplicitRepresentation ;
> >>      ...
> >>    ]
> >
> > Yeah, sorry about the capitalization - my bad. But now that I'm back
> > on track, I think I prefer 'variableExpansion' now instead of
> > 'expansionMethod', so we get:
> >
> >    [
> >      a IriTemplate ;
> >      template "http://example.com/users/{id}" ;
> >      variableExpansion hydra:NoExpansion ;
> >      mapping [
> >        a IriTemplateMapping ;
> >        variable "id" ;
> >        property ex:userId .
> >      ]
> >    ]
> >
> > ...or...
> >
> >    [
> >      a IriTemplate ;
> >      template "http://example.com/users/{id}" ;
> >      variableExpansion hydra:SimplifiedTurtleExpansion ;
> >      mapping [
> >        a IriTemplateMapping ;
> >        variable "id" ;
> >        property ex:userId .
> >      ]
> >    ]
> >
> > Or alternatively, 'hydra:ExpansionNone' and
> 
> Honestly, I found this naming confusing at best. The *template* will always
> be expanded. Variables on the other hand, are not "expanded" in the same
> sense. Assuming the values of variables are RDF literals, we just include
> different components thereof. "NoExpansion" means we just use the lexical
> representation and ignore the datatype and the optional language tag.
> "SimplifiedTurtleExpansion" means we will use all components and serialize it
> in a Turtle-like syntax.
> 

That's an excellent point.

> Taking that into consideration, could you live with calling the property
> "variableRepresentation"?
> 

Turtle (and by extension SimplifiedTurtle) is a language (i.e. the 'Terse RDF Triple Language'), and the W3C spec defines the syntax for that language, which provides 'compatibility with the N-Triples format'.

Since we're trying here to describe: 'the syntax, format, or language used for describing how to interpret the substitution values for all variables used in this template mapping', how about:

1) formatForVariableValue
2) formatOfVariableValue
3) variableValueFormat
4) variableFormat
5) valueFormat

(Ditto for 'syntax' and 'language', but I think 'format' is the most developer friendly)

'variableFormat' seems good (i.e. short and simple), but could be confusing, as it's the format of the value of the variable here, not the format for the variable name used. Likewise, 'valueFormat' is short and sweet, but someone new could think it refers to the value of the overall template.

So I think 'variableValueFormat', although a bit clunky, at least forces someone to think about what is really being specified here, and I think 'the format used for describing how to interpret the substitution values for all variables used in this template mapping' explains it easily enough.

    [
      a IriTemplate ;
      template "http://example.com/users/{id}" ;
      variableValueFormat hydra:SimplifiedTurtle ;
      mapping [
        a IriTemplateMapping ;
        variable "id" ;
        property ex:userId .
      ]
    ]

...and...

    [
      a IriTemplate ;
      template "http://example.com/users/{id}" ;
      variableValueFormat hydra:ValueOnly ;
      mapping [
        a IriTemplateMapping ;
        variable "id" ;
        property ex:userId .
      ]
    ]

> What about calling its two values "SimplifiedTurtle" and
> "LexicalRepresentation", "BasicRepresentation", "ValueRepresentation",
> "ValueOnly", or "OnlyValue". I could live with any of these but find
> "LexicalRepresentation" a bit too RDF-heavy given that mostly non-RDF apps
> will use it.
> 

+1 for 'SimplifiedTurtle' and 'ValueOnly' (I used them above).

> Ruben?
> 
> 
> > 'hydra:ExpansionSimplifiedTurtle' (as I generally recommend
> left-justifying
> > names because it groups related things together alphabetically. But
> > some people don't like it at all, so it's just a suggestion).
> 
> Removing "Expansion" will allow us, and others, to use this in other contexts
> as well.
> 

+1 (also used above).

> 
> >> In my opinion it's too little to justify an extremely ugly and hard
> >> to
> debug
> >> result
> [...]
> >> ... but apparently I'm the only one with that concern. So, what about
> >> the alternative to align this closer to Turtle, i.e., also requiring
> >> the
> angle brackets
> >> where Turtle requires them and calling the representation
> SimplifiedTurtle
> >> (simplified because we don't support prefixes and escaping)?
> >>
> >
> > +1 - I still think this proposal is worth the cost you illustrate
> > +above
> over creating
> > something completely new.
> 
> OK. I give up :-) Since we have an extensible mechanism, we can always add
> other forms later if this turns out to cause problems in practice.
> 
> 
> 
> --
> Markus Lanthaler
> @markuslanthaler
> 
> 
> 

Received on Tuesday, 19 August 2014 07:10:41 UTC