- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 28 Aug 2008 09:13:47 -0500
On Thu, Aug 28, 2008 at 7:13 AM, Eduard Pascual <herenvardo at gmail.com>wrote: > 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. THIS. This was my unarticulable objection to RDFa. I understand that carrying the data around as close to the relevant html as possible is good, and making it possible to embed things like CC licenses with all relevant metadata in a single copypaste operation is awesome, but the redundancy of this being the *only* way to embed it in html bothered me. Using the Selectors module to target things and apply the metadata would be wonderful. It's the most well-known and widely-applied element selection syntax, familiar to web authors across the world. > * You can store the metadata locally or remotely and in any format (ie, > RDF, ID3) that can be parsed by the agent to key/value pairs. Key/value pairs are not enough. We need the subject, too. Triples. Yes, easy. Use some equivalent to an @ rule. Frex: <metadata type="text/rdf"> @namespace( "http://www.somenamespace.com/rdf" ) {<http://purl.org/dc/elements/1.1/title> .person { scope: base; } .person .name { name: content; } .person .title { job-title: content; } #john-doe { name: "Richard Smith"; job-status: "retired"; } } @namespace( "http://www.somefriendlynamespace.com/rdf" ) { .person { scope: base; } #jane-doe { loves: url( #john-doe ); } } </metadata> (I introduced the scope: property for hopefully obvious reasons, but it's very likely not the optimal way to go about this.) Like Eduard, I see the utility in specifying the metadata inline. I also see the downside in specifying the metadata completely outside of the content (it'll inevitably get out of date). However, meeting these two somewhere in the middle allows us to leverage the same sort of benefits that CSS brought over <font> tags; namely, the powerful DRY principle when we've got a lot of data with the same structure across a web site. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080828/e09c3af2/attachment.htm>
Received on Thursday, 28 August 2008 07:13:47 UTC