[uf-discuss] Marking up properties which reused pre-existing microformat

0 views
Skip to first unread message

Glenn Jones

unread,
Dec 14, 2009, 3:27:18 PM12/14/09
to microforma...@microformats.org

One of the problems I am see a lot with hResume is now properties which
reused pre-existing microformat are mark-up.

A good example is "education" in hResume which is hCalendar, I believe
it should be mark-up like so:

<p class="education vevent">
<span class="summary">Bighton Univ</span>
(<span class="dtstart">1985</span> - <span
class="dtend">1988</span>)
</p>

The education property is a hCalendar and as such the same class
attribute should carry both "education" and "vevent". I have built my
parser to look for this type of pattern, but quite a few authors on the
web are using mark-up like this

<div class="education">
<p class="vevent">
<span class="summary">Bighton Univ</span>
(<span class="dtstart">1985</span> - <span
class="dtend">1988</span>)
</p>
</div>

Breaking apart the "education" and "vevent" into separate element class
attributes. Correct if I am wrong but only the first pattern should be
supported by parsers.

Either I need to update my parser or the wiki needs some good pointers
on how properties which reused pre-existing microformat are mark-up.


Glenn


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

Toby Inkster

unread,
Dec 14, 2009, 5:16:55 PM12/14/09
to Microformats Discuss
On Mon, 2009-12-14 at 20:27 +0000, Glenn Jones wrote:
> Breaking apart the "education" and "vevent" into separate element
> class attributes. Correct if I am wrong but only the first pattern
> should be supported by parsers.

I originally only supported the class="education vevent" style in
Swignition, but eventually relented and supported the separate elements
style too. It's so widespread, that I just gave up fighting against the
tide.

Not specifically talking about hResume here, though that is as good an
example as any. Others include hCard's agent property, hCalendar's
contact etc properties, hAudio's contributor property, etc.

--
Toby A Inkster
<mailto:ma...@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Tantek Çelik

unread,
Dec 14, 2009, 6:53:12 PM12/14/09
to Microformats Discuss
On Mon, Dec 14, 2009 at 12:27 PM, Glenn Jones <glenn...@madgex.com> wrote:
>
> One of the problems I am see a lot with hResume is now properties which
> reused pre-existing microformat are mark-up.
>
> A good example is "education" in hResume which is hCalendar, I believe
> it should be mark-up like so:
>
> <p class="education vevent">
>        <span class="summary">Bighton Univ</span>
>        (<span class="dtstart">1985</span> - <span
> class="dtend">1988</span>)
> </p>

Yes. This is an example of the common modular use of a microformat to
provide additional structure to the property value of another
microformat.


> The education property is a hCalendar and as such the same class
> attribute should carry both "education" and "vevent". I have built my
> parser to look for this type of pattern, but quite a few authors on the
> web are using mark-up like this
>
> <div class="education">
>        <p class="vevent">
>                <span class="summary">Bighton Univ</span>
>                (<span class="dtstart">1985</span> - <span
> class="dtend">1988</span>)
>        </p>
> </div>

Could you provide URLs to a few of the "quite a few authors" that
you've found doing this, perhaps in the Examples In The Wild section?

http://microformats.org/wiki/hresume#Examples_in_the_wild

If it's a common errant pattern, we should document it as step one of
deciding what to do next.

> Breaking apart the "education" and "vevent" into separate element class
> attributes. Correct if I am wrong but only the first pattern should be
> supported by parsers.

That's correct, per the hResume schema and field details:

http://microformats.org/wiki/hresume#Schema

"education. optional One or more hcalendar events with the class name
'education', with an embedded hCard indicating the name of school,
address of school etc."

note the distinction between "... events *with* the class name
'education'" and "an *embedded* hCard indicating ... "

The example given in the spec demonstrates an hCalendar event with the
class name 'education':

http://microformats.org/wiki/hresume#Education

<ol class="vcalendar">
<li class="education vevent">
<a class="url summary" href="http://example.edu/">Preston High School</a>
(<abbr class="dtstart" title="2001-01-24">2001</abbr> - <abbr
class="dtend" title="2005-05-25">2005</abbr>)
</li>


> Either I need to update my parser or the wiki needs some good pointers
> on how properties which reused pre-existing microformat are mark-up.

The above description and example are from the hResume spec on the
wiki - if you have ideas for either improving those examples or more
illustrative examples that would have helped, certainly add
suggestions to the feedback page!

http://microformats.org/wiki/hresume-feedback


Thanks Glenn,


Tantek

--
http://tantek.com/

Rafael García Lepper

unread,
Dec 15, 2009, 1:19:24 AM12/15/09
to Microformats Discuss

I don't understand why you are being so unflexible, the definition sure tells to do it this way, but it is a draft, and in case of multiple education events the mark-up would end up like this

<p class="education vevent">
<span class="summary">Bighton Univ</span>
(<span class="dtstart">1985</span> - <span
class="dtend">1988</span>)
</p>
<p class="education vevent">

<span class="summary">Oxford Univ</span>
(<span class="dtstart">1989</span> - <span
class="dtend">1992</span>)
</p>

isn't this pattern redundant repeating the class education? wouldn't it be much cleaner this way?

<div class="education">
<p class="vevent">
<span class="summary">Bighton Univ</span>
(<span class="dtstart">1985</span> - <span
class="dtend">1988</span>)
</p>
<p class="vevent">

<span class="summary">Oxford Univ</span>
(<span class="dtstart">1989</span> - <span
class="dtend">1992</span>)
</p>
</div>

Is it so difficult to parse it this way?

Regards

Rafael G. Lepper

Scott Reynen

unread,
Dec 15, 2009, 1:37:32 AM12/15/09
to Microformats Discuss
On Dec 14, 2009, at 4:53 PM, Tantek Çelik wrote:

> If it's a common errant pattern, we should document it as step one of
> deciding what to do next.

> if you have ideas for either improving those examples or more


> illustrative examples that would have helped, certainly add
> suggestions to the feedback page!


On Dec 14, 2009, at 11:19 PM, Rafael García Lepper wrote:

> I don't understand why you are being so unflexible

Documenting real world examples doesn't strike me as a particularly
onerous prerequisite to changing the standard.

Peace,
Scott

Glenn Jones

unread,
Dec 15, 2009, 3:35:43 AM12/15/09
to microforma...@microformats.org
Rafael wrote

> Is it so difficult to parse it this way?

No it's not too hard to parse this type of pattern. The question is it
right to parse this type of pattern or do we tell people not to use it.

Most authors use the parser as a way of testing weather they have
mark-up something correctly. We need to be careful that we agree how the
parsers should work to keep consistency.

I think it may be a good pattern to add this pattern IF people are using
it naturally and its implemented uniformly across all the parsers. If
not I think there is case to update the wiki to tell people not to use
it.


Tantek wrote


> Could you provide URLs to a few of the "quite a few authors" that
you've found doing this, perhaps in the
> Examples In The Wild section?

You are right I do need document a some examples (a job for when I have
a couple of spare hours). That said two of the hosted services have used
it:

Stack Overflow - http://careers.stackoverflow.com/klmr
YIID - http://pfefferle.yiid.com/cv

This worries me because both these authors took time to try and
understand the spec and came up with the same "errant" pattern.

Toby has already added this pattern to Swignition parser because he has
seen it in the wild.

Glenn

Reply all
Reply to author
Forward
0 new messages