W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2015

[whatwg] HTML Microdata

From: Michael A. Peters <mpeters@domblogger.net>
Date: Tue, 17 Feb 2015 03:40:37 -0800
Message-ID: <54E328B5.6090708@domblogger.net>
To: whatwg@whatwg.org

I never personally paid much attention to microdata before.
However I am coding a CMS and so I have to look at it.

I am having trouble understanding why this isn't at least optionally 
applicable via an external file using CSS selectors.

For example, a web page could have

&lt;link type="foo/xml" src="microdata.xml" /&gt;

microdata.xml then has rules to apply microdata information based upon 
CSS selectors in the document, similar to how XSL works.

That seems to make a lot more sense to me than creating new HTML 
attributes, and it is obvious enough of a concept that surely I can't be 
the first person to have thought of it.

All the examples I looked at of microdata could easily be done that way, 
and it has a lot of advantages:

A) You can use the same microdata.xml file for many pages, allowing it 
to be cached, reducing bandwidth.

B) Many CMS systems store content separate from the template, and could 
have the microdata link tag added to the head node by the template when 
served, so the pages don't need to all be altered to make use of it.

C) It looks like microdata is mostly useful to bots and crawlers, but 
most traffic to a web site is not bots and crawlers, so why not have it 
as an external resource the few clients that want the info can grab.

D) Conceptually, it looks to me like it really is no different than CSS 
- it applies a style to content. A style for machines to better 
understand the content, not a visual style, but still a style - so why 
not use existing CSS selectors that already work well with XML tools?

E) It would allow the microdata to be applied to any type of XML document.

F) It would allow changing the schema(s) used in the future w/o needing 
to modify the content, making maintenance easier.

Is there a reason it has to be embedded in the HTML itself and is not 
available as an external file that can be referenced?

I tried to think of one and couldn't.


Thank you for your time, and I really hope that an update to 
microformats will allow them to be defined external via CSS selectors, 
because as far as I can tell, that is the right way to implement this 
type of thing. It should at least be an option.

Michael A. Peters
Received on Tuesday, 17 February 2015 11:41:07 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:27 UTC