[microformats-discuss] Wanted: Sample code to convert vcard to hcard

Tantek Ç elik tantek at cs.stanford.edu
Mon Aug 8 22:22:57 PDT 2005


Hi Bud,

On 8/8/05 2:05 PM, "Bud Gibson" <bud at thecommunityengine.com> wrote:

> It seems impossible to me to fully specify something like hCard in an
> XMDP

All successful formats that I know of have prose description that goes
beyond what is described by their schema/grammar/dtd.

It is both futile and undesirable to attempt to represent everything about a
format in a machine readable format.  Unless of course you're looking to do
pure research.


> because hCard is so fluid.

Could you be more specific?


> Further, in microformats, there is
> not really an automated method of validation using XML Schema or near
> substitute nor will there be in the foreseeable future.

That's right.  Not in the near future, but the door is open for something
longer term.


> However, it seems that well crafted xslt template rules could provide
> a pretty good sort of pseudo validation.  You add rules based on
> cases you believe to be (i.e., assert are) valid.

In an even more general way, it is possible to build validators for formats
by encoding the rules in the prose of the specifications (in addition to any
formal grammar/schema etc.) in a programming language (XSLT, Perl, etc.).
The W3C validators are built like this.

Thanks,

Tantek



More information about the microformats-discuss mailing list