[whatwg] Ghosts from the past and the semantic Web
Eduard Pascual
herenvardo at gmail.com
Thu Aug 28 05:13:15 PDT 2008
I think some of you got my point quite better than others; and maybe I
should clarify the idea. I see no issue with having some attributes to
embed semantics inline within the HTML, the same way we have style to
embed presentation. The issue is about *forcing* these semantics,
which are not the structure of the document, into the HTML, which is
intended to represent structure.
Although I tried to simplify using only the CSS paralellism (also,
presentation is what ruined HTML3.2, while behaviour just stood
there), Toby has seen deeper than the example and got the exact point
;-) (although I don't entirely agree with the analogy).
Following on with the parallellism:
style="...": inline styles, quite related to things like
onclick="javascript:goBack();" (inline script statements); this would
be equivalent to the current property="" and about="". There is no
issue with them, just that I feel they are not enough. This solves
some cases, but not all.
class="..." when used explicitly to tie with a CSS .class selector;
relates to the usages of onclick="javascript:myFunction();" (rather
than doing all the work there, it hooks with a function defined
somewhere else); and there is currently no equivalent for semantics.
<style> and <script> are used to define document-wide styles and
behaviors. Once again, we lack something to achieve this for
semantics. Introducing a <metadata> element as suggested could be a
solution (I'd rather prefer <semantics>, but that's mostly a matter of
taste), but if somebody has any better idea I'd be glad to hear it.
<link rel="stylesheet"> and <script src="..."> allow to import
stylesheets and scripts that might be shared by several documents. I
guess <link> could be used to import semantics as well.
On the copy-pasting issue mentioned above, I have to disagree: copying
CSS'd contents from a webpage normally preserves the formatting on
most browsers, so I can't see why other kinds of metadata could be an
issue.
Before finnishing, I have come up with a use-case that might help to
illustrate my point. I (hipotetically, because my site is still under
construction) have several projects listed on my website. It'd be a
good idea, on each project's own page, to have embeeded metadata, such
as Title, Author, License, and more specific stuff such as target
platform, intended audience, programming language, version number,
release date, and what-not.
Until that point, embeeded RDF information does the job quite well.
But I also have a page listing all the projects, with some details
about them. Repeating 20 or 50 times will start bloating the code
quite a bit, and it would be extremelly redundant. Ideally, I would
like to be able to define some kind of "pattern" (be it an XPath
expression, a CSS-like selector, or any other way) to represent for
example that the first entry of each project is the title, the second
is the version, then the date, license, and so on. The current
approach for RDF in HTML fails to handle this without extremelly
annoying redundance.
Regards,
Eduard Pascual
More information about the whatwg
mailing list