Subject: Re: Atom Best Practice for directory file listing?

From: Farrukh Najmi <[email-masked]>
Date: Mon, 24 Sep 2007 14:23:16 -0400

Hello,

I am new to ATOM and have a followup question to the archived message below.

Since a folder can contain other folders thus defining a item hierarchy 
how is this hierarchical content best represented in an ATOM feed? A 
modified example based on original from archived message below would be 
terrific. Thanks.

<archived message>

One important thing to keep in mind is that the author element is only
required in an entry if it does not exist at the feed level, so you
really do not need to worry about entry level authors.

This is just off the top of my head, so this might not entirely work,
but if I were building an Atom feed from a directory listing, I'd likely
do something like the following:

<feed xmlns="...">
  <id>file:/path/to/the/folder</id> <!-- or whatever else works -->
  <title>folder name</title>
  <updated>{folder last modified timestamp}</updated>
  <link rel="self" href="..." />
  <link rel="alternate" href="..." />
  <author><name /></author> <!-- the name can be empty-->

  <entry>
    <id>file:/path/to/the/file</id>
    <title>filename</title>
    <updated>{file last modified timestamp}</updated>
    <link rel="alternate" type="..." href="file:/path/to/the/file" />
    <summary>filename, type, last modified, size, etc. Info that would
      typically appear in a directory listing</summary>
  </entry>

</feed>

It really shouldn't need to get anymore complicated than that.

- James

</archived message>

-- 
Regards,
Farrukh

Web: http://www.wellfleetsoftware.com