[whatwg] Trying to work out the problems solved by RDFa

Dan Brickley wrote:

> While I'm unsure about the "commercial relationship" clause quite
> capturing what's needed, the basic idea seems sound. Is there any
> provision (or plans) for applying this notion to entire blocks of
> markup, rather than just to simple hyperlinks? This would be rather
> useful for distinguishing embedded metadata that comes from the page
> author from that included from blog comments or similar.

While that might be useful for natural language processing, for RDFa  
it is actually completely unneeded. The syntax of RDFa allows for  
blocks of markup to be made "invisible" by making an ancestor node  
into an XMLLiteral.

For example, a comment might be marked up as:

<section typeof="atom:Entry" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:atom="http://bblfish.net/work/atom-owl/2006-06-06/#">
   <address rel="atom:author">
     On <time property="atom:published" content="2009-01-10"
     >10 Jan 2009</time>,
     <a property="foaf:name" rel="foaf:page"
     href="http://joe.example.com">Joe Bloggs</a> wrote:
   </address>
   <div rel="atom:content">
     <blockquote property="atom:xhtml">
       <!-- The comment goes here. -->
     </blockquote>
   </div>
</section>

The RDFa processing instructions say that as the blockquote doesn't  
have an explicit datatype set, it is to be treated entirely as a  
string literal (if it doesn't have any child elements) or an XML  
literal (if it does), and that parsers must not look inside it for  
triples. Thus spammers can't use the comment form for stuffing  
triples into the page.

It should be noted in this case that RDFa also allows natural  
language parsers to be made more useful. By looking at the RDFa which  
marks up the author's name and website, they may be able to determine  
that the comment has been written by someone other than the page's  
main author, and thus not afford it the same level of trust granted  
to the rest of the page. So the natural language processing can  
benefit from RDFa.

-- 
Toby A Inkster
<mailto:mail at tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Received on Saturday, 10 January 2009 05:51:26 UTC