[uf-discuss] Microformats vs XML, redundancy

Steven Livingstone connect at stevenR2.com
Thu Apr 27 07:00:24 PDT 2006


Tantek, I really need to catch up on reading this stuff, but I'll go with my
thoughts as I'll learn more about Microformats that way :)

The real benefit as I see it is that with some fairly simple CSS formatting
you can have different views on your hCard. It is great for people who want
to avoid Xml and JavaScript.

The DRY bit I miss a little - I understand your example but why couldn't it
be done within Xml or RDF using the ID and IDREF or even using Xslt. In fact
CSS (and a little JavaScript XPath) could render it pretty good just as Xml
using DRY principles.

In fact if I wanted to stay Very DRY, I'd optionally assign a hCard URI to
each component and allow them to be universally referenced maybe through the
Xslt document() function.

Btw - the Microformats WIKI works well. Probably the most effective use of
Wiki tech I've seen.

Steven
http://stevenR2.com


-----Original Message-----
From: microformats-discuss-bounces at microformats.org
[mailto:microformats-discuss-bounces at microformats.org] On Behalf Of Tantek Ç
elik
Sent: 27 April 2006 14:00
To: microformats-discuss
Subject: Re: [uf-discuss] Microformats vs XML, redundancy

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:

http://microformats.org/wiki/hcard-example1-steps

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

in vCard:

N:Çelik;Tantek
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>
</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.

Thanks,

Tantek

_______________________________________________
microformats-discuss mailing list
microformats-discuss at microformats.org
http://microformats.org/mailman/listinfo/microformats-discuss



More information about the microformats-discuss mailing list