[microformats-discuss] Pure JavaScript Greasemonkey hCard parser

Mark Pilgrim pilgrim at gmail.com
Thu Sep 15 18:04:14 PDT 2005


On 9/15/05, Tantek Çelik <tantek at cs.stanford.edu> wrote:
> > The parser passes all of these tests:
> > http://diveintomark.org/projects/greasemonkey/hcard/tests/
> 
> Super.  I presume these are all from hcard-examples[1]?

Indeed.  I fixed a few bugs in the examples on the wiki.  I made a few
other changes in my own test cases to keep myself sane.  For example,
there is a wide acceptable variation in vCard attributes (type,
encoding, value).  The examples in RFC 2426 are not in any way
"normalized" (type values are sometimes uppercase, sometimes
lowercase; N values are missing due to apparent spec bugs that hCard
handles by making explicit the rules about "implicit N optimization";
etc).  I had to do some normalizing in my test cases, but I believe
the results that the parser outputs are semantically equivalent to the
examples in RFC 2426.

> Mark (and all other hCard developers), one quick question (maybe two), did
> you have a chance to review the issues raised[2] in hcard-parsing[3][4] and
> referenced in hcard-examples, and do you have any objections to the proposed
> resolutions?

My parser handles both singular and plural forms of
category/categories, additional-name/additional-names,
honorific-prefix/honorific-prefixes,
honorific-suffix/honorific-suffixes, and nickname (issue 1).  It also
handles several forms of value properties which I believe cover all
the possibilities raised in issue 2:

- title attribute
- class="value" in child node
- <pre> as child node
- text content

So I don't really care which way the issues get resolved. :)

-- 
Cheers,
-Mark


More information about the microformats-discuss mailing list