Re: Turtle in HTML question/issue

Resent from non TQ email address. (Sorry anyone who gets two)

On Sun, Nov 13, 2011 at 1:12 AM, Ivan Herman <> wrote:
> Hi Gavin,
> I was looking at [1] again, but now with an RDFa goggle on. If I author and RDFa file, it would be perfectly ok to put some parts into an embedded turtle portion and mix the two ways of making RDF statements. There might be RDF statements that do not necessarily make sense as a visible HTML portion on the screen and the current approach in RDFa is to put those into a <div style="display:none"> statement which is really hacking. Ie, the Turtle in HTML feature really comes as a welcome addition imho.

Yes, and I still have my action from the Data in HTML TF to write up
something about it on the wiki. Which is now very over due.

> However. I wonder whether it makes sense for the surrounding RDFa content to have some effect on the turtle portion. Namely:
> - base setting in HTML (which is also the base for the generated RDF from RDFa) would be a @base for the encoded turtle. AFAIK we discussed that at some point, but I have not found it in [1]

There is a need for specific language. But I'm not sure that
supporting using the HTML base the best way to go. The UA would need
to support <base> @xml:base and the base URI DOM API in order to be
compliant with the HTML5 notion of base. And exactly how that
interacts with @base would also need to be defined. This would also do
some odd things to copy and paste safety.

> - maybe more importantly: if RDFa sets a bunch of prefix declarations (and in RDFa there are even some defaults, eg, for rdf or foaf), I wonder whether those prefix declarations should not be valid as @prefix declarations in the embedded turtle. I think that would really be useful for HTML+RDFa authors.

Allowing the use of RDFa prefix declarations which can come from
xmlns, prefix attributes, and vocab attributes would in my mind
needlessly complicate the consumption and authoring of Turtle <script>
fragments. Again it would greatly reduce copy and paste safety.

> - SVG already has a way to add RDF/XML as metadata, as well as the possibility to add RDFa statements[2]. More interestingly, it also has a script element[3]. I think the Turtle syntax should allow for the same style of turtle embedding for SVG, too.

The script element (with the added CDATA directives) would work the
same way as it does in XHTML.

> B.t.w., I think it would be good to publish a Turtle draft soon with those features. This Turtle-in-HTML would be an important addition to the current approaches of embedding RDF data into HTML...
> Thoughts?

I would like to publish a new draft before the of the month. Exactly
what is included in it should be decided by the RDF WG. (N-Triples?
Turtle in HTML? xsd datatypes?)


Received on Tuesday, 15 November 2011 21:32:21 UTC