W3C home > Mailing lists > Public > public-rdf-wg@w3.org > June 2011

Re: Two thoughts on Turtle

From: Steve Harris <steve.harris@garlik.com>
Date: Wed, 8 Jun 2011 09:36:27 +0100
Cc: public-rdf-wg <public-rdf-wg@w3.org>
Message-Id: <BED35DD5-48EB-4B61-8413-A6B98DF56A55@garlik.com>
To: Sandro Hawke <sandro@w3.org>
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".

Or the < and > will have to be escaped.

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.?

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.

- 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.

Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Wednesday, 8 June 2011 08:36:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 22:01:59 UTC