[uf-discuss] Microformats vs XML, redundancy

Tantek Ç elik tantek at cs.stanford.edu
Thu Apr 27 05:59:42 PDT 2006

On 4/26/06 10:52 PM, "Steven Livingstone" <connect at stevenR2.com> wrote:

> not sure where the redundancy comes from - you use what you want.

The redundancy in XML (and other formats as well) comes from the fact that
an element can have only one element name.

Since microformats use attributes which take space separated sets (class,
rel, rev), more than one "element name" can be given to the same piece of
data, thus avoiding the need to repeat that data just because of a
limitation of the syntax of the underlying metaformat.

Enough gibberish - the most easy example that illustrates this is the hCard
Example 1 derivation:


snipped from that page (for more context, just read the page)

in vCard:

FN:Tantek Çelik

Note the redundant data, violating DRY.  As this is in vCard's syntax, it
shows that the problem is not "just" an XML problem, however XML/RDF
versions of vCard have the exact same problem.

in fully spelled-out hCard:

<span class="fn n">
   <span class="given-name">Tantek</span>
   <span class="family-name">Çelik</span>

Note that the *data* is there only once, and also matches typical publishing
behavior (rarely (if ever) do people state things like: "I'm going to lunch
with my co-worker Ryan King (King,Ryan)" in actual content on the Web).

The more I switch back and forth between marking things up with
microformats, and using POX (plain old XML) practices, the more I have found
this problem, and am convinced that the whole "one name per element" was
actually a mistake in XML (or perhaps SGML), but I'm certainly not going to
attempt to "fix" either of those, preferring to instead just "Get Things
Done(tm)" with microformats.



More information about the microformats-discuss mailing list