W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > November 2011

Looking at HTML Literal

From: Gregg Kellogg <gregg@kellogg-assoc.com>
Date: Wed, 23 Nov 2011 19:56:43 -0500
To: RDFa WG <public-rdfa-wg@w3.org>
Message-ID: <9FCA1C44-678A-4A81-B3B9-EFD84E40ED89@greggkellogg.net>
I recently sent some feedback [1] to the RDF WG on the use of XML Literals. The use of XML Literals in RDFa has often been problematic in tests, due, in part, to the need for XML Exclusive Canonicalization. Moreover, as XML Literal is used in RDFa principally to create literals including HTML markup, the fact that it's an XML Literal increasingly becomes a problem. It was more appropriate when all host languages are XML based (XHTML, SVG), but with HTML-based languages the content could just as easily be tag-soup. Also, note this specific exchange:

On Nov 23, 2011, at 4:15 PM, Richard Cyganiak wrote:
> On 23 Nov 2011, at 23:04, Gregg Kellogg wrote:
>> One thing XMLLiteral implies is that an RDFa processor should use use the HTML/XML content to form the literal, not the innerText content. This is really what most people care about, IMO. Within a different context, say JSON-LD, it might be useful in an Ajax response to know that the result should update the text or HTML of the element; for example using jQuery $("#id").html(literal value) vs $("#id").text(literal value). None of this requires any reasoning over the literal value itself; I think that's a more common use of the datatype.
> What you're saying is that rdf:XMLLiteral is being abused to indicate the presence of general HTML markup. This abuse indicates the existence of an important unmet need. The response should be a call for meeting that need, and not necessarily a call for changing rdf:XMLLiteral to legalize the abuse.

Richard raises a good point, if my take on the use of rdf:XMLLiteral is a reasonable view. In HTML+RDFa, if the use is to capture HTML markup, that might not be valid XML, we should use a different datatype [2].

We should think about introducing this datatype and treating it similarly to rdf:XMLLiteral, but without the canonicalization requirements. There are arguments for either doing no processing (i.e. L2V just like xsd:string), or coercing to an infoset and using well-structured HTML, but I think this might be overkill for the intended applications.


[1] Request fo clarifications thread at http://lists.w3.org/Archives/Public/public-rdf-comments/2011Nov/
[2] http://www.w3.org/2011/rdf-wg/track/issues/63
Received on Thursday, 24 November 2011 00:57:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:05:27 UTC