Semantics in HTML 5
alistapart.com
alistapart.com
It occurs to me that the W3C already has an extensible semantics framework: RDF. This framework can be represented in many different languages (primarily N3 and XML), and is quite well-understood amongst semantic web people. The trouble is how to associate RDF 3-tuples with (X)HTML elements.
To take the date example from the original article, <span id="date1">May Day next year</span> could be represented in a machine readable format be the following 3-tuple. (I am not an expert in N3, so please pardon any mistakes. Also, if there's a good existing vocabulary for "equivalent to", please let me know.)
<#date1> <http://example.com/#equivalent>; date"2009-05-01"
In turn, this 3-tuple could be encoded in <meta> and <link> elements a la Dublin Core, or could be stored in an external RDF/XML or N3 document referenced by a <link> element. Perhaps a new element could even be introduced (just one) that allows the direct embedding of RDF content in a manner similar to the embedding of CSS content via the <style> element.
This solution would have the benefits of being extensible, flexible, robust and well-understood. The biggest drawback that I can see is that developers would have to learn RDF along with some common ontologies.
* Use whatever elements you want, subject to some name limitations.
* Style those elements using stylesheets however you want. (CSS 3.0 finally, AFAIK, completes the set of CSS elements you need to finish emulating/implementing all HTML elements that exist up to this point, including table.)
* Let an entirely separate layer argue about semantics. Use the <link> tag to link in those semantics or something. (The ideal would be XML namespaces but this is HTML, not XHTML.) Define a semantic set that matches today's semantics, let the future define what it needs. Let this be the default if no semantic is chosen. Let a thousand flowers bloom, let the winners win.
Ultimately, the whole W3C process is flawed at its very core. It's some small, essentially self-selected group of people/organizatiosn trying to decide how the Web Will Be for the Next Ten Years. That's just stupid, and inimical to the way of the web itself.
But this is just too darned simple an idea to get "standardized"...
More seriously, one way I know I differ from the HTML and Semantic Web folk is that I fundamentally disagree about the nature of semantics. Semantics are not something a document possesses, it is something that you apply to a document. Marking up text is a way to make it easier to apply semantics, but a sufficiently sophisticated (AI-complete) algorithm could apply semantics to flat text just fine. Indicating what semantics you are using in the document somehow (like an XML namespace) makes it easier for the producer and consumer to agree about their semantics, but the consumer may still ignore it and may still extract or apply their own semantics to the document without contradiction. Think about it this way and my proposal is simply the only natural way to proceed. Believe that "Today is <date>January 20, 2008</date>" is actually any different than "Today is <menu>January 20, 2008</menu>" in some "real" way and this W3C exercise of trying to define THE tag set makes sense. But it's all just tags. Just numbers applied to other numbers. Meaning is brought by the reader in collaboration with the writer, there is no intrinsic meaning.
* except those would also be CSS, so maybe "cascading semantics documents", or CSD
The whole point of having semantically meaningful documents is so that machines can better understand them. Having a system where each developer creates their own "meaning hooks" is worse than useless - its a waste of time and bandwidth - and leaves us in the same position we are in today where a machine ignores markup and tries to infer meaning from context.
Standards and convention are important.
The only way to create a truly searchable and meaningful web is for us all to use an agreed upon set of tags that add meaning.
completely agree.