[whatwg] Ghosts from the past and the semantic Web

Shannon shannon at arc.net.au
Wed Aug 27 18:41:00 PDT 2008

Eduard Pascual wrote:
> I would like to encourage this community to learn from what it has
> already been done in the past, check what worked, and see why it
> worked; then apply it to the problem at hand. If for presentation CSS
> worked (and I really think it did; if somebody disagrees I invite you
> to share your opinion), then let's see what made it work:
> First of all, and essentially, CSS was independent to HTML, although
> they were to be used together. I hope it is already clear by now that
> we need to deal with semantics from outside of HTML. RDF is an example
> of a mechanism that is independent to HTML.
> Next, CSS had a simple syntax, despite the size of its vocabulary:
> once you understand the "selector { property: value; }", you
> understand most of CSS syntax. The RDF's XML format is quite verbose
> and is not a good example of a simple syntax. But RDFa comes to the
> rescue, providing an approach to simplify the syntax.
> Last, but not least, CSS was usable with HTML because there where were
> hooks between the two: the selector's semantics are based in HTML's
> structure (and, by extension, any other markup language). CSS was,
> indeed, intended to represent the presentation of markup documents.
> RDFa provides some hook; but there is a gotcha: RDFa is not intended
> to represent the semantics of a web document; but to embeed those
> semantics within the document. RDF just represents (semantic)
> relationships between concepts; and RDFa puts that representation
> inside the document.
> In summary, I think RDFa might work, and it wouldn't be a too bad
> solution, but I don't think it is the best approach either.

I think you were on to something with the CSS-like approach. Ian has 
stated earlier that class should be considered a generic categorisation 
element rather than only a CSS hook. If so then this would also let us 
hook metadata to classes. ie:

<metadata type="text/cascading-metadata">
.author {
    species: human;
    produces: books;
    consumes: coffee;
.author .john_smith {
    name: John Smith;
    dob: 2000-01-01;

.author {
    color: purple;

<ul class="author">
    <li class="john_smith">John Smith</li>
    <li class="jane_simmons">Jane Simmons</li>

There is no reason why a range of XML metadata formats like text/rdf 
couldn't be supported provided they are not used inline (like the 
example above) but imported. ie:
<link rel="metadata" href="global.rdf" type="text/rdf">

Since this approach requires only one new tag <metadata> and the 
metadata is separate from the structural elements this should resolve 
some concerns. In addition since this proposal does not limit HTML to 
one metadata language (though a default could be decided) so there is 
more flexibility in the future to support currently unknown formats.

 From the designers point of view there is less typing, since a single 
class attribute can hook both style and meaning to the same structure 
and the meanings can be reused. Using a public namespace would be a 
simple matter of:
<link rel="metadata" 
href="http://www.standards.org/metadata/media/movies.rdf" type="text/rdf">

If RDF or RDFa are considered too heavy to be a default language (and 
they suffer from being impossible to embed inline or in <metadata> 
blocks) then the "cascading metadata" approach above might be useful. 
Since it can reuse existing CSS parsers, editors and behaviour 
(selectors, cascading model) it should have a lower implementation 
burden than XML+Namespaces.


More information about the whatwg mailing list