[whatwg] Ghosts from the past and the semantic Web

Toby A Inkster mail at tobyinkster.co.uk
Thu Aug 28 01:51:24 PDT 2008

I consider the following to be analogous:

Presentation   / Semantics          / Behaviour
rel=stylesheet / rel=transformation / <script src="...">
style="..."    / RDFa               / on*="..."

That is, if we consider an external stylesheet linked to with  
rel=stylesheet as effectively being a set of rules for mapping from  
XPaths (no, CSS selectors are not XPaths, but are functionally  
equivalent) to presentations, then it should be noted that  
rel=transformation (i.e. GRDDL) provides us with an analogous mapping  
of XPaths to semantics, and unobtrusive scripting techniques can  
assign behavioural properties similarly.

Using CSS I can style any elements with class "person" as green, and  
make any elements with class "name" which are descendants of class  
"person" bold. With GRDDL, I can map the HTML class "person" to an  
RDF class of "foaf:Person" and map the HTML class "name" to an RDF  
property "foaf:name". And with some unobtrusive scripting, I might be  
able to pop up an "add this person to my contacts" option when people  
hover over the person's name.

But for various reasons, it is often desirable to sprinkle bits of  
presentation and behaviour throughout the document. For presentation,  
the style attribute is used. For behaviour, there is a whole gamut of  
onthis and onthat attributes. RDFa is the equivalent for semantics.

The GRDDL and RDFa proposals basically just ask for semantics to have  
the same facilities in HTML that presentation and behaviour do: that  
is, an external stylesheet-like facility (GRDDL profiles and  
rel=transformation) and an inline adhoc facility (RDFa's attributes  
-- and there really aren't many of them compared with on*).

Bringing a good presentational layer to HTML eliminated the need to  
have separate PDFs for printing. (Although many sites still do.)  
Decent scripting in HTML is beginning to eliminate the need to  
download and install applications -- Google and many others have been  
releasing web applications which almost match desktop applications in  
terms of richness of user experience. Adding a similar semantic layer  
to HTML is something new -- RDF has been around for a while, but it's  
always been something separate. What might it eliminate the need for  
in the future? Downloads of pure data, certainly -- spreadsheets,  
vCards, etc. But there are plenty of other opportunities for  
semantically rich HTML -- most of which probably haven't even been  
thought of yet.

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

More information about the whatwg mailing list