[uf-discuss] hAtom draft

Ryan King ryan at technorati.com
Wed Dec 21 14:19:07 PST 2005


On Dec 20, 2005, at 8:57 PM, Benjamin Carlyle wrote:
> Ryan,
>
> On Tue, 2005-12-20 at 12:05 -0800, Ryan King wrote:
> > On Dec 20, 2005, at 7:44 AM, Benjamin Carlyle wrote:
> > > Reading the information from
> > > that atomenabled.org I'm inclined to write the parser as only  
> placing
> > > author and contributor elements in an entry when they appear in  
> the
> > > hAtom html within an entry. If author and contributor fields  
> were only
> > > to be found at the feed level I would only repeat them there in  
> the
> > > atom
> > > output. Is my inclination reasonable? That would make any atom  
> feed
> > > reader responsible for making the association between a feed  
> with a
> > > particular author an each entry having a particular author  
> rather than
> > > the transform...
> > I'm not sure I follow what you're saying here.
> > Are you saying that when you transform to Atom, you're inclined to
> > replicate the author information on every entry?
>
> My current implementation looks within a class=entry for author and
> contributor details. If it finds none it searches the feed (or
> approximately so, the implementation is currently a little hacky)  
> for an
> author and places it within the <atom:entry> on output. If the feed  
> has
> an author it will be duplicated within each entry.
>
> My inclination is to drop this processing, and only place atom:author
> and atom:contributor where they appear in the source document. If they
> appear at the feed level they are placed there. If they appear at the
> entry level they are placed there. If they occur in both they are  
> placed
> in both. If they occur in neither they are placed in neither.

This sounds reasonable.

> On Tue, 2005-12-20 at 15:29 -0500, David Janes wrote:
> > The Atom spec layers further requirements in the text, specifically
> from the
> > Recommended Elements [4]
> >
> > "Names one author of the entry. An entry may have multiple  
> authors. An entry
> > must contain at least one author element unless there is an  
> author element
> > in the enclosing feed, or there is an author element in the  
> enclosed source
> > element."
>
> Ok, I took this on my reading as indicating that an author or
> contributor at the atom:feed level would negate the need to provide
> these fields on each atom:entry. But this:
> > Right now, the
> > hAtom spec does not define author (or contributor) at the feed level
> is certainly pause for thought. If it isn't legal to put them at
> the atom:feed level or the meaning of the elements at the atom:feed
> level is unclear copying the information into atom:entry nodes on
> transform to atom would seem reasonable.

It not that its illegal, it just isn't defined yet. Your algorithm  
above seems reasonable and if it produces good results for you, I'd  
say go ahead with it. Your experiences with it could certainly help  
shape the spec around extracting author information.

-rk
--
Ryan King
ryan at technorati.com





More information about the microformats-discuss mailing list