Re: Turtle: Properties of list elements

Victor,


Are you trying to figure out which of the 2 variants should be used? 
Isn't it a false dichotomy? There are many other possibilities.

But in order to answer you, we would need to know exactly what you are 
trying to do. It appears that one of your criteria is easiness to read 
and write (for people). I suggest that you use English, instead of Turtle.

If this is addressed to a computer programme, easiness to read and write 
for people is irrelevant. It is like saying "I may use a relational data 
model, but if the number of tables grow large, I need many CSV files to 
store them, it's not convenient to read and write".

Since I have no idea what you want to do, I speculated that you do not 
need a list at all. Why are the interpreters ordered? Why does the list 
have to be closed?

Then, if you really want to use the first model and want the description 
of lang:xsltproc to be close to its occurrence as a list member in the 
Turtle text, then you can do this terrible thing:

:boiler :interpretersList [
   rdf:first lang:xsltproc;
   rdf:rest _:l1
] .
lang:xsltproc
   :langMinVersion "1.0";
    # ...etc.
_:l1
   rdf:first lang:python;
   rdf:rest _:l2 .
lang:python
   :langMinVersion ...;
   # ...etc.

As an additional remark, I think that Debian packages should *not* be 
sequences of characters. You should have URIs for them.


--AZ

Le 15/02/2018 17:45, Victor Porton a écrit :
> I have to build an ordered list of interpreters (Python, XSLTProc,
> etc.)
>
> The first variant to expose this in Turtle:
>
> ###############################################
> @prefix : <http://portonvictor.org/ns/trans/internal/> .
> @prefix lang: <http://portonvictor.org/ns/trans/scripts/#> .
>
> :boiler :interpretersList
> (
>      lang:xsltproc
>      #...
> ) .
>
> lang:xsltproc
>      :langMinVersion "1.0" ;
>      :langMaxVersion "1.0" ;
>      :command ("xsltproc"
>                [ :params ("--param" :name :value) ]
>                :script) ;
>      :debianPackage "xsltproc" .
> ###############################################
>
> This variant has the disadvantage that if the list grows long, there
> will be a long distance between lang:xsltproc in the list and its
> description (below). This makes inconvenient to read and write the
> Turtle file.
>
> This variant has the advantage that every element of the list has a
> definite resource (such as lang:xsltproc) associated with it.
>
> The second variant to expose this in Turtle:
>
> ###############################################
> @prefix : <http://portonvictor.org/ns/trans/internal/> .
> @prefix lang: <http://portonvictor.org/ns/trans/scripts/#> .
>
> :boiler :interpretersList
> (
>      [
>          :lang lang:xsltproc ;
>          :langMinVersion "1.0" ;
>          :langMaxVersion "1.0" ;
>          :command ("xsltproc"
>                    [ :params ("--param" :name :value) ]
>                    :script) ;
>          :debianPackage "xsltproc"
>      ]
>      #...
> ) .
> ###############################################
>
> The advantage of this variant is that all info about an interpreter is
> presented in one place (between [ and ]). This makes it convenient to
> read and edit.
>
> The disadvantage is that there is no resource name associated with the
> interpreter.
>
> Which of the variants to choose? or maybe you know a third variant?
>
> I may also propose to produce new version of Turtle format which would
> allow to add "labeled" objects to a list? Let us discuss the exact
> details of this possible new extension to Turtle syntax.
>

-- 
Antoine Zimmermann
Institut Henri Fayol
École des Mines de Saint-Étienne
158 cours Fauriel
CS 62362
42023 Saint-Étienne Cedex 2
France
Tél:+33(0)4 77 42 66 03
Fax:+33(0)4 77 42 66 66
http://www.emse.fr/~zimmermann/
Member of team Connected Intelligence, Laboratoire Hubert Curien

Received on Friday, 16 February 2018 10:18:05 UTC