- From: Gregg Kellogg <gregg@greggkellogg.net>
- Date: Mon, 21 May 2012 10:45:42 -0400
- To: Richard Cyganiak <richard@cyganiak.de>
- CC: "public-rdf-comments@w3.org" <public-rdf-comments@w3.org>
On May 21, 2012, at 3:49 AM, "Richard Cyganiak" <richard@cyganiak.de> wrote: > Hi Gregg, > > On 18 May 2012, at 23:25, Gregg Kellogg wrote: >> The editor's draft of RDF Concepts section on rdf:HTML Datatype [1] makes a specific callout about @lang needing to be included explicitly in the HTML literal. I presume that this reasoning also applies to any in-scope @xml:base (valid in XHTML5). So, if we consider the following: >> >> <div property="rdf:value" datatype="rdf:HTML" xml:base="http://example.com/foo"> >> Interesting topic located <a href="bar">here</a>. >> </div> >> >> The xml:base context in effect during processing would _not_ be retained in the literal. This is probably worth a similar note in the concepts document. > > I've updated the note, it now reads: > > [[ > Any language annotation (lang="…") or XML namespaces (xmlns) desired in the HTML content must be included explicitly in the HTML literal. Relative URLs in attributes such as href do not have a well-defined base URL and are best avoided. > ]] > http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-concepts/index.html#note-html-context > > Is this better? Yes thanks, I think making the bit about relative URLs in @href makes this clear. > (As Gavin noted, xml:base is only allowed in XHTML5 document but not in HTML5 documents, therefore mentioning it explicitly would be confusing IMO. I don't think there's anything wrong as such with using @datatype="rdf:HTML" in XHTML5+RDFa — it basically means that the fragment has to be valid XHTML5, but will be treated as HTML5.) > > Note that RDFa *could* define additional rules when parsing the contents of elements that have @datatype="rdf:HTML", such as absolutizing all URLs, or copying XML namespaces from the context onto the elements that need them, before generating the HTML literal. I don't have a particular opinion on whether that would be a good idea or not. Jut my opinion, but I don't believe the RDfa group will want to do _any_ processing of the literal. My Ruby RDFa implementation supports a simple innerHTML-like content model.. Gregg > Best, > Richard
Received on Monday, 21 May 2012 14:50:11 UTC