W3C home > Mailing lists > Public > semantic-web@w3.org > November 2010

Re: microformat for turtle?

From: Nathan <nathan@webr3.org>
Date: Thu, 25 Nov 2010 17:10:08 +0000
Message-ID: <4CEE9870.8000405@webr3.org>
To: Sandro Hawke <sandro@w3.org>
CC: semantic-web <semantic-web@w3.org>
Sandro Hawke wrote:
> On Thu, 2010-11-25 at 16:51 +0000, Nathan wrote:
>> You can pretty much already do this unambiguously in a nice way by 
>> leveraging the <script> element:
>>
>>   <body>
>>    <p>some normal content</p>
>>    <script type="text/turtle">
>>      @prefix foaf: <http://xmlns.com/foaf/0.1/> .
>>
>>      <http://example.com/bob#me> a foaf:Person;
>>        foaf:name "Bob" .
>>
>>      :a :b ( "apple" "banana" ) .
>>    </script>
>>    <p>more..</p>
>>
>> Benefits are that it gets ignored by normal script processors, you can 
>> specify the correct media type, and charset, you can include other 
>> scripts or extensions which lift / work with / handle the data - and you 
>>   don't need to do any special &lt; encoding or suchlike. Also allowing 
>> anybody to copy and paste it directly and so on.
> 
> Very nice!    Have you seen that used in practice?

I can safely say I will from this day forwards :), v often!

a couple of proof-of-concept examples:

   http://webr3.org/apps/play/embeds/turtle
   http://webr3.org/apps/play/embeds/javascript

Best,

Nathan
Received on Thursday, 25 November 2010 17:11:15 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:41:24 UTC