Re: Two thoughts on Turtle

On Wed, 2011-06-08 at 09:36 +0100, Steve Harris wrote:
> On 2011-06-07, at 22:48, Sandro Hawke wrote:
> 
> > Especially coming out of the schema.org debates, there are two things
> > I'd like to see, if we can get them to work out.
> > 
> > 1.  Turtle-in-HTML.  
> > 
> > I think it's standard-compliant right now to publish RDF in HTML like
> > this:
> > 
> >        <script type="text/turtle">
> >        @prefix foaf: <http://xmlns.com/foaf/0.1/>.
> >        <http://www.w3.org/People/Sandro/data#Sandro_Hawke> foaf:name
> >        "Sandro Hawke".
> >        </script>
> > 
> > See [1].
> 
> I think it depends on the dialect of HTML, e.g. XHTML will require:
> 
>        <script type="text/turtle"><![CDATA[
>        @prefix foaf: <http://xmlns.com/foaf/0.1/>.
>        <http://www.w3.org/People/Sandro/data#Sandro_Hawke> foaf:name
>        "Sandro Hawke".
>        ]]></script>
> 
> Or the < and > will have to be escaped.

Yes, but I figure the few people still using XHTML :-) probably already
know this. It's the same quoting you need for Javascript, where have
less-than signs.

> Given that we already have RDFa as a way to embed RDF in HTML, I'm not quite sure what this adds? It's easier for RDF geeks, but will it help people who just want to mark up good relations for e.g.?

My sense is that it's easier for nearly everybody, once the RDF starts
to get a little bit complicated.   I suspect page designers don't
actually want their nesting constrained to match the RDF graph shape; in
fact, I doubt they want to know about the RDF graph shape, unless they
are (to turn the tables) RDF geeks.
  
The deployment situation I think will be most comfortable, long run, is
for the HTML to be generated by querying the RDF, but not thinking about
how the RDF is exposed, and then little turtle-script sections emitted
containing the RDF that was used to generate that HTML.

> Not sure how I feel about the colons thing. If we added that Turtle would no longer be a strict subset of N3, and as you point out we'd lose the SPARQL/Turtle alignment that we've been working on.

Yes.   I wonder if there's some way to do a usability study on this, to
figure out what it's really worth.   Maybe someone teaching a semweb
class can do two sessions, one with the colon and one without, and see
how the students do...

     -- Sandro

> - Steve
> 
> > But I would like to make sure our Turtle spec makes that clear, and
> > perhaps we can address some questions about base and relative URIs, and
> > other issues that might arise in having multiple Turtle blocks at the
> > same URL.  
> > 
> > 2.  Turtle Barewords
> > 
> > I think there is a large class of users that would appreciate being able
> > to write:
> > 
> >        @prefix <http://xmlns.com/foaf/0.1/>.
> >        [] a Person; name "Sandro Hawke", mbox <mailto:sandro@w3.org>.
> >        [] a Person; name "Ivan Herman". mbox <mailto:ivan@w3.org>.
> > 
> > Note that I left out a whole lot of colons.
> > 
> > N3 does something like this, although it uses:
> > 
> >        @prefix default <http://xmlns.com/foaf/0.1/>.
> > 
> > which is okay, too. 
> > 
> > TimBL designed N3 to be future-proof around this by saying if you use a
> > default like this, you can't use keywords like "a" without also
> > declaring them, with "@keyword a".   That made sense at the time [2],
> > but I don't think it's something we need to worry about any more.  I
> > don't think Turtle will be getting new keywords, without a leading "@",
> > without a change of media type.  [3]
> > 
> > I know this is a problem for SPARQL, which does have lots of keywords
> > and is likely to add more; I don't have a good solution for that.
> > 
> > I suppose some people might hold that colons are good for people, always
> > reminding them that they *could* be using other namespaces, but I'm not
> > convinced.  There's a large audience who I think can and probably should
> > use Turtle who will be using it mostly with one namespace and will
> > appreciate not having to learn to work with and around a lot of
> > unnecessary colons.
> > 
> >     -- Sandro
> > 
> > [1] http://lists.w3.org/Archives/Public/semantic-web/2010Nov/0218.html
> > [2] http://lists.w3.org/Archives/Public/www-rdf-interest/2001Jan/0170
> > [3] And if this is my "there is a world market for maybe five computers"
> > statement, I can live with that.
> > 
> > 
> 

Received on Wednesday, 8 June 2011 14:04:10 UTC