[uf-new] Re: Comment Questions
Toby A Inkster
mail at tobyinkster.co.uk
Fri Nov 14 11:08:47 PST 2008
Martin McEvoy wrote:
> Also, Are there any parsers that will digest nested <hfeed> elements ?
Recent versions of Cognition will handle nested hfeeds correctly,
only associating the hentries with their innermost ancestor hfeed.
e.g.:
<hfeed id="f1">
<hentry id="f1e1" />
<hentry id="f1e2">
<hfeed id="f2">
<hentry id="f2e1" />
</hfeed>
</hentry>
<hfeed id="f3">
<hentry id="f3e1" />
</hfeed>
</hfeed>
Will be parsed as a structure:
Feed f1:
Entry f1e1
Entry f1e2
Feed f2:
Entry f2e1
Feed f3:
Entry f3e1
However, no particular relationship between the feeds is inferred
from the nesting. They are taken to be completely independent.
Atom files of course only allow a single <feed/> element, so if
outputting Atom, Cognition needs to be told which feed to output. By
default it will pick the implied hfeed on <html> if that has any
entries, and if not it will pick one mostly at random. If given an
input URI with a fragment identifier that points to an element with
class='hfeed' it will output the feed identified. The RDF based
outputs include all the feeds, but not using an RSS-compatible
vocabulary.
--
Toby A Inkster
<mailto:mail at tobyinkster.co.uk>
<http://tobyinkster.co.uk>
More information about the microformats-new
mailing list