Re: microformat for turtle?

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