[uf-discuss] The trouble with titles (in hAtom)

David Janes davidjanes at blogmatrix.com
Mon Oct 2 05:56:05 PDT 2006


Fixed. Y'all can try it by pasting in the text here [1].

For those not heads down in hAtom, the tricky parts in the sample below are:

- markup inside the <Q> are supposed to be ignored wrt. hAtom elements
- missing entry-title then should trigger the logic outlined below
- multiple entry-content sections to be aggregated together

Regards, etc...
David

[1] http://tools.blogmatrix.com/extract/

On 9/28/06, Ian McKellar <ian at mckellar.org> wrote:
> Hi,
>
> I'm playing with writing a generic microformat parser that'll be able
> to parse any format, given some minimal definition. I started with geo
> (piece of cake) and then went on to hAtom (since I've been playing
> with it a little lately. I got stuck on how to express the fallback
> rules for entry title:
>
> if the Entry Title is missing, use
>
>     * the first <h#> element in the Entry, or
>     * the <title> of the page, if there is no enclosing Feed element, or
>     * assume it is the empty string
>
> so Tantek suggested I check out what other implementations out there do.
>
> I threw a really minimal hAtom document at hatom2atom & the AUMFP:
> <html>
>   <head>
>     <title>I should be the title</title>
>   </head>
>   <body>
>     <p class="hentry">
>       <span class="entry-content">I'm the start of the entry. </span>
>       <q><span class="entry-title">I'm not the title</span></q>
>       <span class="entry-content">I'm the rest of the entry.</span>
>     </p>
>   </body>
> </html>
>
> >From my reading of the hAtom spec this page represents an hatom feed
> with no title and one entry with the title "I should be the title" and
> the content "I'm the start of the entry. I'm the rest of the entry."
>
> hatom2atom attached the title to the feed not the entry, and the AUMFP
> didn't find the title at all.
>
> So the point of the email is twofold - firstly, these tools probably
> need to be updated, and secondly, I don't really understand where the
> current behaviour came from - is it the behaviour we want?
>
> Ian
>
> --
> Ian McKellar <http://ian.mckellar.org/>
> ianloic on [flickr | aim | yahoo | skype]
> ian at mckellar.org on [email | jabber | msn]
> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
> http://microformats.org/mailman/listinfo/microformats-discuss
>


More information about the microformats-discuss mailing list